---
openapi: 3.0.1
info:
  title: WelcomeHome API V1
  version: v1
  description: |+
    ## Authorization Request Header

    When making requests, include your API Token in an Authorization request header
    like so:

    ```
    Authorization: Token token={your_token_here}
    ```

    You can test your API token using the "/api/ping" endpoint. For example:

    ```
    curl https://crm.welcomehomesoftware.com/api/ping -H "Authorization: Token token={token_here}"
    ```

    A successful authentication returns with response code 200 and a JSON body
    describing the account the token provides access to. E.g.,

    ```
    {"account_id":2,"lead_source_id":null}
    ```

    A failed authentication returns with response code 401 and the message:

    ```
    {"error":"Bad credentials"}
    ```

    A failed authorization returns with response code 403 and the message:

    ```
    {"error":"Not authorized to perform this action"}
    ```

paths:
  "/activities":
    get:
      summary: List Activities
      tags:
      - Activities
      parameters:
      - name: limit
        in: query
        required: false
        description: |
          Numbers of records to return per page.
          See response details below to learn about pagination.
          Default: `10`.
          Maximum: `100`.
        schema:
          type: integer
      - name: filters[activity_type_id]
        in: query
        required: false
        description: 'Activity Type ID to search on.

          '
        schema:
          type: integer
      - name: filters[created_at_after]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      - name: filters[created_at_before]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      - name: filters[updated_at_after]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      - name: filters[updated_at_before]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      responses:
        '200':
          description: list activities (expand to read about pagination)
          headers:
            Link:
              type: string
              description: |
                If the response has been paginated and there are more records to
                retrieve, the "Link" header will be present with a URL that can be used to
                fetch the next page.

                E.g., `Link: <https://crm.welcomehomesoftware.com/api/path/to/endpoint?cursor=6eb0d8c2e74cedf3>; rel="next"`

                Note: a given cursor can only be used 3 times within a single minute, a
                limit imposed to mitigate infinitely pulling the same page.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    completed_at:
                      type: string
                      format: date-time
                    direction:
                      type: string
                    notes:
                      type: string
                    sales_counselor_id:
                      type: integer
                    scheduled_at:
                      type: string
                      format: date-time
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
                    record_type:
                      type: string
                    record_id:
                      type: integer
                    stage_id:
                      type: integer
                    activity_type_id:
                      type: integer
                    discarded_at:
                      type: string
                      format: date-time
                    activity_result_id:
                      type: integer
                    pinned:
                      type: boolean
                    community_id:
                      type: integer
                    created_by_id:
                      type: integer
                    completed_successfully:
                      type: boolean
                    add_to_calendar:
                      type: boolean
                    time_zone:
                      type: string
                      nullable: false
                      example: Eastern Time (US & Canada)
                    calendar_event_start_time:
                      type: string
                      example: '14:00'
                    calendar_event_end_time:
                      type: string
                      example: '15:00'
                    person_ids:
                      type: array
                      items:
                        type: integer
  "/prospects/{prospect_id}/activities":
    get:
      summary: List Prospect Activities
      tags:
      - Activities
      responses:
        '200':
          description: list activities
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    completed_at:
                      type: string
                      format: date-time
                    direction:
                      type: string
                    notes:
                      type: string
                    sales_counselor_id:
                      type: integer
                    scheduled_at:
                      type: string
                      format: date-time
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
                    record_type:
                      type: string
                    record_id:
                      type: integer
                    stage_id:
                      type: integer
                    activity_type_id:
                      type: integer
                    discarded_at:
                      type: string
                      format: date-time
                    activity_result_id:
                      type: integer
                    pinned:
                      type: boolean
                    community_id:
                      type: integer
                    created_by_id:
                      type: integer
                    completed_successfully:
                      type: boolean
                    add_to_calendar:
                      type: boolean
                    time_zone:
                      type: string
                      nullable: false
                      example: Eastern Time (US & Canada)
                    calendar_event_start_time:
                      type: string
                      example: '14:00'
                    calendar_event_end_time:
                      type: string
                      example: '15:00'
                    person_ids:
                      type: array
                      items:
                        type: integer
    post:
      summary: Create Activity
      tags:
      - Activities
      description: |+
        To add a start and end time, `"add_to_calendar": true` must be passed
        along with time_zone, calendar_event_start_time, and
        calendar_event_end_time. calendar_event_start_time and
        calendar_event_end_time also support Meridian indicators like "3:00 PM".
        The standard North American time zones are:
        ["Eastern Time (US & Canada)", "Central Time (US & Canada)", "Mountain Time (US & Canada)", "Pacific Time (US & Canada)", "Alaska", "Arizona", "Hawaii"]

      parameters: []
      responses:
        '200':
          description: Create an activity
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  completed_at:
                    type: string
                    format: date-time
                  direction:
                    type: string
                  notes:
                    type: string
                  sales_counselor_id:
                    type: integer
                  scheduled_at:
                    type: string
                    format: date-time
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  record_type:
                    type: string
                  record_id:
                    type: integer
                  stage_id:
                    type: integer
                  activity_type_id:
                    type: integer
                  discarded_at:
                    type: string
                    format: date-time
                  activity_result_id:
                    type: integer
                  pinned:
                    type: boolean
                  community_id:
                    type: integer
                  created_by_id:
                    type: integer
                  completed_successfully:
                    type: boolean
                  time_zone:
                    type: string
                    nullable: false
                    example: Eastern Time (US & Canada)
                  calendar_event_start_time:
                    type: string
                    example: '14:00'
                  calendar_event_end_time:
                    type: string
                    example: '15:00'
                  person_ids:
                    type: array
                    items:
                      type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                activity:
                  type: object
                  properties:
                    activity_result_id:
                      type: integer
                    activity_type_id:
                      type: integer
                    completed_at:
                      type: string
                      format: date-time
                      description: If null, activity is scheduled to be performed
                    direction:
                      type: string
                      description: One of 'inbound' or 'outbound'
                    notes:
                      type: string
                      description: |
                        Can include basic HTML. Allowed elements:
                        <code>
                        a abbr acronym address b big blockquote br cite code dd del dfn div dl dt em h1 h2 h3 h4 h5 h6 hr i img ins kbd li mark ol p pre samp small span strong sub sup time tt ul var
                        </code>
                    pinned:
                      type: boolean
                      description: |
                        Pinned activities are pinned to the top of the completed
                        activities list that users see. They are also displayed
                        along with the life story.
                    sales_counselor_id:
                      type: integer
                    scheduled_at:
                      type: string
                      format: date-time
                      description: 'Note: users only see the scheduled date, not the
                        time.

                        '
                    add_to_calendar:
                      type: boolean
                      description: |
                        If true, time_zone, calendar_event_start_time, and
                        calendar_event_end_time will be required
                    time_zone:
                      type: string
                      nullable: false
                      example: Eastern Time (US & Canada)
                      description: |
                        The standard North American time zones are:
                        ["Eastern Time (US & Canada)", "Central Time (US & Canada)", "Mountain Time (US & Canada)", "Pacific Time (US & Canada)", "Alaska", "Arizona", "Hawaii"]
                    calendar_event_start_time:
                      type: string
                      example: '14:00'
                      description: |
                        Supports both military time and 12-hour time with Meridian indicators
                        like "2:00 PM"
                    calendar_event_end_time:
                      type: string
                      example: '15:00'
                      description: |
                        Supports both military time and 12-hour time with Meridian indicators
                        like "3:00 PM"
                    person_ids:
                      type: array
                      items:
                        type: integer
                      description: 'A list of person IDs of any people included in
                        the activity

                        '
                  required:
                  - activity_type_id
  "/prospects/{prospect_id}/activities/{activity_id}":
    put:
      summary: Update Prospect Activity
      tags:
      - Activities
      description: |+
        To add a start and end time, `"add_to_calendar": true` must be passed
        along with time_zone, calendar_event_start_time, and
        calendar_event_end_time. calendar_event_start_time and
        calendar_event_end_time also support Meridian indicators like "3:00 PM".
        The standard North American time zones are:
        ["Eastern Time (US & Canada)", "Central Time (US & Canada)", "Mountain Time (US & Canada)", "Pacific Time (US & Canada)", "Alaska", "Arizona", "Hawaii"]

      parameters: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  completed_at:
                    type: string
                    format: date-time
                  direction:
                    type: string
                  notes:
                    type: string
                  sales_counselor_id:
                    type: integer
                  scheduled_at:
                    type: string
                    format: date-time
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  record_type:
                    type: string
                  record_id:
                    type: integer
                  stage_id:
                    type: integer
                  activity_type_id:
                    type: integer
                  discarded_at:
                    type: string
                    format: date-time
                  activity_result_id:
                    type: integer
                  pinned:
                    type: boolean
                  community_id:
                    type: integer
                  created_by_id:
                    type: integer
                  completed_successfully:
                    type: boolean
                  add_to_calendar:
                    type: boolean
                  time_zone:
                    type: string
                    nullable: false
                    example: Eastern Time (US & Canada)
                  calendar_event_start_time:
                    type: string
                    example: '14:00'
                  calendar_event_end_time:
                    type: string
                    example: '15:00'
                  person_ids:
                    type: array
                    items:
                      type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                activity:
                  type: object
                  properties:
                    activity_result_id:
                      type: integer
                    activity_type_id:
                      type: integer
                    completed_at:
                      type: string
                      format: date-time
                      description: If null, activity is scheduled to be performed
                    direction:
                      type: string
                      description: One of 'inbound' or 'outbound'
                    notes:
                      type: string
                      description: |
                        Can include basic HTML. Allowed elements:
                        <code>
                        a abbr acronym address b big blockquote br cite code dd del dfn div dl dt em h1 h2 h3 h4 h5 h6 hr i img ins kbd li mark ol p pre samp small span strong sub sup time tt ul var
                        </code>
                    pinned:
                      type: boolean
                      description: |
                        Pinned activities are pinned to the top of the completed
                        activities list that users see. They are also displayed
                        along with the life story.
                    sales_counselor_id:
                      type: integer
                    scheduled_at:
                      type: string
                      format: date-time
                      description: 'Note: users only see the scheduled date, not the
                        time.

                        '
                    add_to_calendar:
                      type: boolean
                      description: |
                        If true, time_zone, calendar_event_start_time, and
                        calendar_event_end_time will be required
                    time_zone:
                      type: string
                      nullable: false
                      example: Eastern Time (US & Canada)
                      description: |
                        The standard North American time zones are:
                        ["Eastern Time (US & Canada)", "Central Time (US & Canada)", "Mountain Time (US & Canada)", "Pacific Time (US & Canada)", "Alaska", "Arizona", "Hawaii"]
                    calendar_event_start_time:
                      type: string
                      example: '14:00'
                      description: |
                        Supports both military time and 12-hour time with Meridian indicators
                        like "2:00 PM"
                    calendar_event_end_time:
                      type: string
                      example: '15:00'
                      description: |
                        Supports both military time and 12-hour time with Meridian indicators
                        like "3:00 PM"
                    person_ids:
                      type: array
                      items:
                        type: integer
                      description: 'A list of person IDs of any people included in
                        the activity

                        '
  "/activity_results":
    get:
      summary: List Activity Results
      tags:
      - Activities
      responses:
        '200':
          description: list activity results
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                    successful:
                      type: boolean
                    discarded_at:
                      type: string
                      format: date-time
                      nullable: true
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
  "/activity_types":
    get:
      summary: List Activity Types
      tags:
      - Activities
      responses:
        '200':
          description: list activity types
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    account_id:
                      type: integer
                    name:
                      type: string
                      example: Tour
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
  "/care_types":
    get:
      summary: List Care Types
      tags:
      - Care Types
      responses:
        '200':
          description: list care types
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                      example: Assisted Living
                    abbreviation:
                      type: string
                      example: AL
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
  "/close_reasons":
    get:
      summary: List Close Reasons
      tags:
      - Close Reasons
      responses:
        '200':
          description: list close reasons
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                    details_type:
                      type: string
                      enum:
                      - none
                      - free_text
                      - dropdown
                    details_description:
                      type: string
                      nullable: true
                    deceased_close_reason:
                      type: boolean
                    discarded_at:
                      type: string
                      format: date-time
                      nullable: true
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
  "/communities":
    get:
      summary: List Communities
      tags:
      - Communities
      responses:
        '200':
          description: list communities
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                      example: Community Name
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
  "/events":
    get:
      summary: List Events
      tags:
      - Events
      parameters:
      - name: limit
        in: query
        required: false
        description: |
          Numbers of records to return per page.
          See response details below to learn about pagination.
          Default: `10`.
          Maximum: `100`.
        schema:
          type: integer
      - name: filters[community_id]
        in: query
        required: false
        example: 1
        schema:
          type: integer
      - name: filters[created_at_after]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      - name: filters[created_at_before]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      - name: filters[updated_at_after]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      - name: filters[updated_at_before]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      responses:
        '200':
          description: ok
          headers:
            Link:
              type: string
              description: |
                If the response has been paginated and there are more records to
                retrieve, the "Link" header will be present with a URL that can be used to
                fetch the next page.

                E.g., `Link: <https://crm.welcomehomesoftware.com/api/path/to/endpoint?cursor=6eb0d8c2e74cedf3>; rel="next"`

                Note: a given cursor can only be used 3 times within a single minute, a
                limit imposed to mitigate infinitely pulling the same page.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    community_id:
                      type: integer
                      required: true
                    name:
                      type: string
                      required: true
                    host_id:
                      type: integer
                      required: true
                      description: User ID of the event's host
                    date:
                      type: string
                      description: 'e.g., "1/31/2000" or "2000-01-31" '
                      example: 1/31/2000
                    start_time:
                      type: string
                      example: '14:00'
                      description: |
                        Supports both military time and 12-hour time with Meridian indicators
                        like "2:00 PM"
                    end_time:
                      type: string
                      example: '15:00'
                      description: |
                        Supports both military time and 12-hour time with Meridian indicators
                        like "3:00 PM"
                    time_zone:
                      type: string
                      nullable: false
                      example: Eastern Time (US & Canada)
                      description: |
                        The standard North American time zones are:
                        ["Eastern Time (US & Canada)", "Central Time (US & Canada)", "Mountain Time (US & Canada)", "Pacific Time (US & Canada)", "Alaska", "Arizona", "Hawaii"]
                    location:
                      type: string
                      example: Morningside of Bellaire
                      description: Defaults to the Community's name
                    address:
                      type: string
                      example: 123 Main St, NY, NY
                      description: Defaults to the Community's address
                    budget:
                      type: decimal
                      example: 2200.5
                    total_cost:
                      type: decimal
                      example: 2100.0
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
    post:
      summary: Create Event
      tags:
      - Events
      parameters: []
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  community_id:
                    type: integer
                    required: true
                  name:
                    type: string
                    required: true
                  host_id:
                    type: integer
                    required: true
                    description: User ID of the event's host
                  date:
                    type: string
                    description: 'e.g., "1/31/2000" or "2000-01-31" '
                    example: 1/31/2000
                  start_time:
                    type: string
                    example: '14:00'
                    description: |
                      Supports both military time and 12-hour time with Meridian indicators
                      like "2:00 PM"
                  end_time:
                    type: string
                    example: '15:00'
                    description: |
                      Supports both military time and 12-hour time with Meridian indicators
                      like "3:00 PM"
                  time_zone:
                    type: string
                    nullable: false
                    example: Eastern Time (US & Canada)
                    description: |
                      The standard North American time zones are:
                      ["Eastern Time (US & Canada)", "Central Time (US & Canada)", "Mountain Time (US & Canada)", "Pacific Time (US & Canada)", "Alaska", "Arizona", "Hawaii"]
                  location:
                    type: string
                    example: Morningside of Bellaire
                    description: Defaults to the Community's name
                  address:
                    type: string
                    example: 123 Main St, NY, NY
                    description: Defaults to the Community's address
                  budget:
                    type: decimal
                    example: 2200.5
                  total_cost:
                    type: decimal
                    example: 2100.0
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                event:
                  type: object
                  properties:
                    community_id:
                      type: integer
                      required: true
                    name:
                      type: string
                      required: true
                    host_id:
                      type: integer
                      required: true
                      description: User ID of the event's host
                    date:
                      type: string
                      description: 'e.g., "1/31/2000" or "2000-01-31" '
                      example: 1/31/2000
                    start_time:
                      type: string
                      example: '14:00'
                      description: |
                        Supports both military time and 12-hour time with Meridian indicators
                        like "2:00 PM"
                    end_time:
                      type: string
                      example: '15:00'
                      description: |
                        Supports both military time and 12-hour time with Meridian indicators
                        like "3:00 PM"
                    time_zone:
                      type: string
                      nullable: false
                      example: Eastern Time (US & Canada)
                      description: |
                        The standard North American time zones are:
                        ["Eastern Time (US & Canada)", "Central Time (US & Canada)", "Mountain Time (US & Canada)", "Pacific Time (US & Canada)", "Alaska", "Arizona", "Hawaii"]
                    location:
                      type: string
                      example: Morningside of Bellaire
                      description: Defaults to the Community's name
                    address:
                      type: string
                      example: 123 Main St, NY, NY
                      description: Defaults to the Community's address
                    budget:
                      type: decimal
                      example: 2200.5
                    total_cost:
                      type: decimal
                      example: 2100.0
                  required:
                  - community_id
                  - name
                  - host_id
  "/events/{event_id}/rsvps":
    post:
      summary: RSVP to an Event
      tags:
      - Events
      description: |
        This endpoint updates an RSVP status of an invite that corresponds to a
        person's email or ID, for the given event.

        Either an email or a person ID is required.

        If both an email and a person ID are present, only the person ID will be
        used. If the email is used for multiple people who are invited to the
        event, all of the corresponding invites will be updated to the given
        status.

        If an email or a person ID for an uninvited person is submitted, then that
        person's Prospect or Referrer record will be invited to the event, and the
        invite that corresponds to the submitted email or ID will be updated to the
        given status.

        All people with an invite to the corresponding event that match the
        provided email address will be updated to the same status.

        If an email or person ID is submitted that does not exist, this endpoint
        returns a 404 response.

        If no status parameter or neither email or person ID parameters are
        submitted, this endpoint returns a 422 response.
      parameters:
      - name: event_id
        description: An event ID
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: success
        '404':
          description: not_found
        '422':
          description: unprocessable_entity
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                status:
                  type: string
                  enum:
                  - pending_response
                  - accepted
                  - declined
                  - not_sure
                person_id:
                  type: integer
              required:
              - status
  "/exports/community/{community_id}/table/{table}":
    get:
      summary: Live, paginated CSV data
      tags:
      - Exports
      description: |
        This endpoint provides live, paginated bulk export capability.

        This endpoint is the most efficient way to get a full data dump out of
        WelcomeHome. It can also be used to poll for changes by filtering based on
        `updated_at`.

        For example, a common strategy used to maintain an up-to-date copy of
        WelcomeHome's data is to:

        - Perform an initial pull of each table, paging through all results to get
        an entire copy of the dataset

        - Periodically re-poll, but using `updated_at_after` to retrieve any
        changes made since the last poll.

        By default, this endpoint returns 1000
        results per page. To retrieve all data, be sure to request each page until
        all pages have been fetched.

        If the response has been paginated and there are more records to
        retrieve, the "Link" header will be present with a URL that can be used to
        fetch the next page.

        E.g., `Link: <https://crm.welcomehomesoftware.com/api/path/to/endpoint?cursor=6eb0d8c2e74cedf3>; rel="next"`

        Note: a given cursor can only be used 3 times within a single minute, a
        limit imposed to mitigate infinitely pulling the same page.


        All timestamps are in UTC unless otherwise specified.
      parameters:
      - name: community_id
        description: A community ID or `all` for all communities
        in: path
        required: true
        schema:
          type: string
      - name: table
        description: |
          The table to export. One of:
          - Organizations
          - Referrers
          - Prospects
          - ProspectFields
          - ReferrerFields
          - Residents
          - Influencers
          - Activities
          - ExternalReferences
          - Units
          - HousingContracts
          - DepositTransactions
          - MarketingTouchpoints
          - ServiceAgreements
          - Traits
          - Users
          - WaitlistEntries

          Note the capitalization of the table names. The values are case-sensitive
        in: path
        required: true
        schema:
          type: string
      - name: sort_by
        description: |
          Column to sort by:
          - `updated_at` (default)
          - `created_at`
        in: query
        required: false
        schema:
          type: string
      - name: limit
        in: query
        required: false
        description: |
          Numbers of records to return per page.
          See response details below to learn about pagination.
          Default: `1000`.
          Maximum: `10000`.
        schema:
          type: integer
      - name: filters[created_at_after]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      - name: filters[created_at_before]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      - name: filters[updated_at_after]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      - name: filters[updated_at_before]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      responses:
        '200':
          description: CSV (expand to read about pagination)
          headers:
            Link:
              type: string
              description: |
                If the response has been paginated and there are more records to
                retrieve, the "Link" header will be present with a URL that can be used to
                fetch the next page.

                E.g., `Link: <https://crm.welcomehomesoftware.com/api/path/to/endpoint?cursor=6eb0d8c2e74cedf3>; rel="next"`

                Note: a given cursor can only be used 3 times within a single minute, a
                limit imposed to mitigate infinitely pulling the same page.
  "/exports/daily_snapshots/table/{table}":
    get:
      summary: Daily snapshot of CSV data
      tags:
      - Exports
      description: |
        This endpoint provides access to unpaginated, daily snapshots of the
        same content that can be retrieved from the live, paginated export
        endpoint.

        The snapshots are generated nightly. In order to use this endpoint,
        please contact support@welcomehomesoftware.com to ask for the daily
        snapshot export endpoint to be activated.

        This endpoint may be a better choice for Business Intelligence (BI)
        integrations in which:

        - Daily frequency is sufficient
        - Pagination is difficult or cumbersome

        Requires an API Token with access to all communities

        All timestamps are in UTC unless otherwise specified.
      parameters:
      - name: table
        description: |
          The table to export. One of:
          - Organizations
          - Referrers
          - Prospects
          - ProspectFields
          - ReferrerFields
          - Residents
          - Influencers
          - Activities
          - ExternalReferences
          - Units
          - HousingContracts
          - DepositTransactions
          - MarketingTouchpoints
          - ServiceAgreements
          - Traits
          - Users
          - WaitlistEntries

          Note the capitalization of the table names. The values are case-sensitive
        in: path
        required: true
        schema:
          type: string
      - name: direct
        description: |
          Set to `true` to receive the file content directly instead of a
          redirect.

          By default, this endpoint redirects to a signed S3 URL, which is the
          most efficient approach. However, some clients (such as Azure Data
          Factory) cannot follow HTTP redirects. For these clients,
          `direct=true` streams the file through our servers instead.

          Note: We suggest only using the direct option if necessary.
        in: query
        required: false
        schema:
          type: string
      responses:
        '301':
          description: Redirect to CSV location (default)
        '200':
          description: CSV content (when direct=true)
  "/floor_plans":
    get:
      summary: List Floor Plans
      tags:
      - Floor Plans
      parameters:
      - name: filters[community_id]
        in: query
        required: false
        example: '1'
        schema:
          type: integer
      responses:
        '200':
          description: list floor plans
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    community_id:
                      type: integer
                    name:
                      type: string
                    square_feet:
                      type: integer
                    beds:
                      type: integer
                    baths:
                      type: decimal
                    occupancy_points:
                      type: decimal
                    default_privacy_level_id:
                      type: integer
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
  "/housing_contracts":
    get:
      summary: List Housing Contracts
      tags:
      - HousingContracts
      parameters:
      - name: limit
        in: query
        required: false
        description: |
          Numbers of records to return per page.
          See response details below to learn about pagination.
          Default: `10`.
          Maximum: `100`.
        schema:
          type: integer
      - name: filters[created_at_after]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      - name: filters[created_at_before]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      - name: filters[updated_at_after]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      - name: filters[updated_at_before]
        in: query
        required: false
        example: '2000-01-01T00:00:00Z'
        schema:
          type: string
      - name: filters[move_in_date_before]
        in: query
        required: false
        example: '2000-01-01'
        schema:
          type: string
      - name: filters[move_in_date_after]
        in: query
        required: false
        example: '2000-01-01'
        schema:
          type: string
      - name: filters[prospect_id]
        in: query
        required: false
        example: 1
        schema:
          type: integer
      - name: filters[resident_id]
        in: query
        required: false
        example: 1
        schema:
          type: integer
      - name: filters[community_id]
        in: query
        required: false
        example: 1
        schema:
          type: integer
      responses:
        '200':
          description: list housing contracts
          headers:
            Link:
              type: string
              description: |
                If the response has been paginated and there are more records to
                retrieve, the "Link" header will be present with a URL that can be used to
                fetch the next page.

                E.g., `Link: <https://crm.welcomehomesoftware.com/api/path/to/endpoint?cursor=6eb0d8c2e74cedf3>; rel="next"`

                Note: a given cursor can only be used 3 times within a single minute, a
                limit imposed to mitigate infinitely pulling the same page.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    community_id:
                      type: integer
                    unit_id:
                      type: integer
                    move_in_date:
                      type: datetime
                    move_out_date:
                      type: datetime
                    financial_move_in_date:
                      type: date
                    financial_move_out_date:
                      type: date
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
                    move_out_reason_id:
                      type: integer
                    monthly_rate:
                      type: integer
                    recurring_concession:
                      type: integer
                    one_time_concession:
                      type: integer
                    sales_counselor_id:
                      type: integer
                    notice_given_date:
                      type: datetime
                    deposit_received_on:
                      type: datetime
                    deposit_amount:
                      type: integer
                    occupancy_point_factor:
                      type: integer
                    community_fee_amount:
                      type: integer
                    community_fee_received_on:
                      type: datetime
                    risk_level:
                      type: integer
                    transfer_from_id:
                      type: integer
                    count_move_in:
                      type: boolean
                    count_move_out:
                      type: boolean
                    stay_type:
                      enum:
                      - permanent
                      - respite
                      - day
                      type: string
                    concession_description:
                      type: string
                    privacy_level_id:
                      type: integer
                    privacy_level_variant:
                      type: string
                      example: A
                    move_out_reason_details:
                      type: string
                    resident_count_override:
                      type: integer
                    leased_on:
                      type: datetime
                    lease_canceled_on:
                      type: datetime
                    prospect_ids:
                      type: array
                      items:
                        type: integer
                    resident_ids:
                      type: array
                      items:
                        type: integer
                    status:
                      enum:
                      - future
                      - notice
                      - prior
                      - current
                      - canceled
                      type: string
                    housing_contract_field_values_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          housing_contract_field_id:
                            type: integer
                          housing_contract_field_name:
                            type: string
                          value:
                            oneOf:
                            - type: string
                            - type: array
                              items:
                                type: string
                            description: |
                              Values must be formatted appropriately for the given field type:

                              - `amount`: a number with optional decimals (e.g., "100" or "100.12")
                              - `date`: DD/MM/YYYY (e.g., "1/1/2001" or "01/01/2001")
                              - `checkbox`: "0" for unchecked, "1" for checked
                              - `single_line_text`: a string with no newlines
                              - `paragraph`: a string that may contain newlines
                              - `multi_select_list`: an array of strings
                              - `single_select_list`: a string
    post:
      summary: Create Housing Contract
      tags:
      - HousingContracts
      parameters: []
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  community_id:
                    type: integer
                  unit_id:
                    type: integer
                  move_in_date:
                    type: datetime
                  move_out_date:
                    type: datetime
                  financial_move_in_date:
                    type: date
                  financial_move_out_date:
                    type: date
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  move_out_reason_id:
                    type: integer
                  monthly_rate:
                    type: integer
                  recurring_concession:
                    type: integer
                  one_time_concession:
                    type: integer
                  sales_counselor_id:
                    type: integer
                  notice_given_date:
                    type: datetime
                  deposit_received_on:
                    type: datetime
                  deposit_amount:
                    type: integer
                  occupancy_point_factor:
                    type: integer
                  community_fee_amount:
                    type: integer
                  community_fee_received_on:
                    type: datetime
                  risk_level:
                    type: integer
                  transfer_from_id:
                    type: integer
                  count_move_in:
                    type: boolean
                  count_move_out:
                    type: boolean
                  stay_type:
                    enum:
                    - permanent
                    - respite
                    - day
                    type: string
                  concession_description:
                    type: string
                  privacy_level_id:
                    type: integer
                  privacy_level_variant:
                    type: string
                    example: A
                  move_out_reason_details:
                    type: string
                  resident_count_override:
                    type: integer
                  leased_on:
                    type: datetime
                  lease_canceled_on:
                    type: datetime
                  prospect_ids:
                    type: array
                    items:
                      type: integer
                  resident_ids:
                    type: array
                    items:
                      type: integer
                  status:
                    enum:
                    - future
                    - notice
                    - prior
                    - current
                    - canceled
                    type: string
                  housing_contract_field_values_attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        housing_contract_field_id:
                          type: integer
                        housing_contract_field_name:
                          type: string
                        value:
                          oneOf:
                          - type: string
                          - type: array
                            items:
                              type: string
                          description: |
                            Values must be formatted appropriately for the given field type:

                            - `amount`: a number with optional decimals (e.g., "100" or "100.12")
                            - `date`: DD/MM/YYYY (e.g., "1/1/2001" or "01/01/2001")
                            - `checkbox`: "0" for unchecked, "1" for checked
                            - `single_line_text`: a string with no newlines
                            - `paragraph`: a string that may contain newlines
                            - `multi_select_list`: an array of strings
                            - `single_select_list`: a string
        '422':
          description: unprocessable_entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      one_time_concession:
                      - must be greater than or equal to 0
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                housing_contract:
                  type: object
                  properties:
                    community_id:
                      type: integer
                    unit_id:
                      type: integer
                    resident_ids:
                      type: array
                      items:
                        type: integer
                    move_in_date:
                      type: datetime
                    financial_move_in_date:
                      type: date
                    move_out_date:
                      type: datetime
                    financial_move_out_date:
                      type: date
                    notice_given_date:
                      type: datetime
                    leased_on:
                      type: datetime
                    lease_canceled_on:
                      type: datetime
                    move_out_reason_id:
                      type: integer
                    move_out_reason_details:
                      type: string
                    privacy_level_id:
                      type: integer
                    privacy_level_variant:
                      type: string
                      example: A
                    sales_counselor_id:
                      type: integer
                    stay_type:
                      enum:
                      - permanent
                      - respite
                      - day
                      type: string
                    monthly_rate:
                      type: integer
                    one_time_concession:
                      type: integer
                    recurring_concession:
                      type: integer
                    concession_description:
                      type: string
                    resident_count_override:
                      type: integer
                    count_move_in:
                      type: boolean
                    count_move_out:
                      type: boolean
                  required:
                  - community_id
                  - unit_id
                  - resident_ids
  "/housing_contracts/{id}":
    put:
      summary: Update Housing Contract
      tags:
      - HousingContracts
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  community_id:
                    type: integer
                  unit_id:
                    type: integer
                  move_in_date:
                    type: datetime
                  move_out_date:
                    type: datetime
                  financial_move_in_date:
                    type: date
                  financial_move_out_date:
                    type: date
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  move_out_reason_id:
                    type: integer
                  monthly_rate:
                    type: integer
                  recurring_concession:
                    type: integer
                  one_time_concession:
                    type: integer
                  sales_counselor_id:
                    type: integer
                  notice_given_date:
                    type: datetime
                  deposit_received_on:
                    type: datetime
                  deposit_amount:
                    type: integer
                  occupancy_point_factor:
                    type: integer
                  community_fee_amount:
                    type: integer
                  community_fee_received_on:
                    type: datetime
                  risk_level:
                    type: integer
                  transfer_from_id:
                    type: integer
                  count_move_in:
                    type: boolean
                  count_move_out:
                    type: boolean
                  stay_type:
                    enum:
                    - permanent
                    - respite
                    - day
                    type: string
                  concession_description:
                    type: string
                  privacy_level_id:
                    type: integer
                  privacy_level_variant:
                    type: string
                    example: A
                  move_out_reason_details:
                    type: string
                  resident_count_override:
                    type: integer
                  leased_on:
                    type: datetime
                  lease_canceled_on:
                    type: datetime
                  prospect_ids:
                    type: array
                    items:
                      type: integer
                  resident_ids:
                    type: array
                    items:
                      type: integer
                  status:
                    enum:
                    - future
                    - notice
                    - prior
                    - current
                    - canceled
                    type: string
                  housing_contract_field_values_attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        housing_contract_field_id:
                          type: integer
                        housing_contract_field_name:
                          type: string
                        value:
                          oneOf:
                          - type: string
                          - type: array
                            items:
                              type: string
                          description: |
                            Values must be formatted appropriately for the given field type:

                            - `amount`: a number with optional decimals (e.g., "100" or "100.12")
                            - `date`: DD/MM/YYYY (e.g., "1/1/2001" or "01/01/2001")
                            - `checkbox`: "0" for unchecked, "1" for checked
                            - `single_line_text`: a string with no newlines
                            - `paragraph`: a string that may contain newlines
                            - `multi_select_list`: an array of strings
                            - `single_select_list`: a string
        '422':
          description: unprocessable_entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      one_time_concession:
                      - must be greater than or equal to 0
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                housing_contract:
                  type: object
                  properties:
                    unit_id:
                      type: integer
                    resident_ids:
                      type: array
                      items:
                        type: integer
                    move_in_date:
                      type: datetime
                    financial_move_in_date:
                      type: date
                    move_out_date:
                      type: datetime
                    financial_move_out_date:
                      type: date
                    notice_given_date:
                      type: datetime
                    leased_on:
                      type: datetime
                    lease_canceled_on:
                      type: datetime
                    move_out_reason_id:
                      type: integer
                    move_out_reason_details:
                      type: string
                    privacy_level_id:
                      type: integer
                    privacy_level_variant:
                      type: string
                      example: A
                    sales_counselor_id:
                      type: integer
                    stay_type:
                      enum:
                      - permanent
                      - respite
                      - day
                      type: string
                    monthly_rate:
                      type: integer
                    one_time_concession:
                      type: integer
                    recurring_concession:
                      type: integer
                    concession_description:
                      type: string
                    resident_count_override:
                      type: integer
                    count_move_in:
                      type: boolean
                    count_move_out:
                      type: boolean
  "/influencers/{id}":
    get:
      summary: Show Influencer
      tags:
      - Influencers
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  decision_maker:
                    type: boolean
                  health_care_proxy:
                    type: boolean
                  person_attributes:
                    properties:
                      id:
                        type: integer
                      first_name:
                        type: string
                        nullable: true
                      middle_name:
                        type: string
                        nullable: true
                      last_name:
                        type: string
                        nullable: true
                      cell_phone:
                        type: string
                        nullable: true
                      home_phone:
                        type: string
                        nullable: true
                      work_phone:
                        type: string
                        nullable: true
                      email:
                        type: string
                        nullable: true
                      fax_number:
                        type: string
                        nullable: true
                      do_not_call:
                        type: boolean
                        default: false
                      do_not_email:
                        type: boolean
                        default: false
                      do_not_mail:
                        type: boolean
                        default: false
                      do_not_text:
                        type: boolean
                        default: false
                      birthdate:
                        type: string
                        nullable: true
                      provided_age:
                        type: integer
                        nullable: true
                      gender:
                        type: string
                        enum:
                        - male
                        - female
                        nullable: true
                      address_attributes:
                        type: object
                        properties:
                          line1:
                            type: string
                            nullable: true
                          line2:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          state:
                            type: string
                            nullable: true
                          zip:
                            type: string
                            nullable: true
                    type: object
                  point_of_contact:
                    type: boolean
                  power_of_attorney:
                    type: boolean
                  notes:
                    type: string
                  relationship_id:
                    type: integer
    put:
      summary: Update Influencer
      tags:
      - Influencers
      description: |
        The influencers endpoint allows you to update certain data points for
        influencers in WelcomeHome.

        The permitted data points relate to birthdate, age, gender, and address.
      parameters: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  decision_maker:
                    type: boolean
                  health_care_proxy:
                    type: boolean
                  person_attributes:
                    properties:
                      id:
                        type: integer
                      first_name:
                        type: string
                        nullable: true
                      middle_name:
                        type: string
                        nullable: true
                      last_name:
                        type: string
                        nullable: true
                      cell_phone:
                        type: string
                        nullable: true
                      home_phone:
                        type: string
                        nullable: true
                      work_phone:
                        type: string
                        nullable: true
                      email:
                        type: string
                        nullable: true
                      fax_number:
                        type: string
                        nullable: true
                      do_not_call:
                        type: boolean
                        default: false
                      do_not_email:
                        type: boolean
                        default: false
                      do_not_mail:
                        type: boolean
                        default: false
                      do_not_text:
                        type: boolean
                        default: false
                      birthdate:
                        type: string
                        nullable: true
                      provided_age:
                        type: integer
                        nullable: true
                      gender:
                        type: string
                        enum:
                        - male
                        - female
                        nullable: true
                      address_attributes:
                        type: object
                        properties:
                          line1:
                            type: string
                            nullable: true
                          line2:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          state:
                            type: string
                            nullable: true
                          zip:
                            type: string
                            nullable: true
                    type: object
                  point_of_contact:
                    type: boolean
                  power_of_attorney:
                    type: boolean
                  notes:
                    type: string
                  relationship_id:
                    type: integer
        '422':
          description: unprocessable_entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      person.provided_age:
                      - must be less than 200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                influencer:
                  properties:
                    notes:
                      type: string
                    person_attributes:
                      type: object
                      properties:
                        first_name:
                          type: string
                          nullable: true
                        middle_name:
                          type: string
                          nullable: true
                        last_name:
                          type: string
                          nullable: true
                        cell_phone:
                          type: string
                          nullable: true
                        home_phone:
                          type: string
                          nullable: true
                        work_phone:
                          type: string
                          nullable: true
                        email:
                          type: string
                          nullable: true
                        fax_number:
                          type: string
                          nullable: true
                        do_not_call:
                          type: boolean
                          default: false
                        do_not_email:
                          type: boolean
                          default: false
                        do_not_mail:
                          type: boolean
                          default: false
                        do_not_text:
                          type: boolean
                          default: false
                        birthdate:
                          type: string
                          nullable: true
                        provided_age:
                          type: integer
                          nullable: true
                        gender:
                          type: string
                          enum:
                          - male
                          - female
                          nullable: true
                        address_attributes:
                          type: object
                          properties:
                            line1:
                              type: string
                              nullable: true
                            line2:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            state:
                              type: string
                              nullable: true
                            zip:
                              type: string
                              nullable: true
                    relationship_id:
                      type: integer
  "/lead_sources":
    get:
      summary: List Lead Sources
      tags:
      - Lead Sources
      responses:
        '200':
          description: list lead sources
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                    category:
                      type: string
                    discarded_at:
                      type: string
                      format: date-time
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
  "/move_out_reasons":
    get:
      summary: List Move Out Reasons
      tags:
      - Move Out Reasons
      responses:
        '200':
          description: list move out reasons
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                    system_reason:
                      type: string
                      enum:
                      - deceased
                      nullable: true
                    details_description:
                      type: string
                      nullable: true
                    discarded_at:
                      type: string
                      format: date-time
                      nullable: true
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
  "/privacy_levels":
    get:
      summary: List Privacy Levels
      tags:
      - Privacy Levels
      parameters:
      - name: filters[community_id]
        in: query
        required: false
        example: '1'
        schema:
          type: integer
      responses:
        '200':
          description: list privacy levels
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                    community_id:
                      type: integer
                    exclude_second_residents_from_resident_count:
                      type: boolean
                    occupants:
                      type: integer
                      description: |
                        How many residents can occupancy this room. This value dictates how many
                        "occupancy points" each resident counts as. For example, if occupants is
                        2, then each resident counts of 0.5 occupancy points
                    second_resident_variant:
                      type: boolean
                      description: |
                        Whether this privacy level supports second residents. Second residents
                        do not impact occupancy points (i.e., they always count as 0 points)
                    second_resident_variant_show_a:
                      type: boolean
                      description: |
                        When `second_resident_variant`, whether the primary resident's unit
                        number has 'A' added as a suffix
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
    post:
      summary: Create Privacy Level
      tags:
      - Privacy Levels
      parameters: []
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  community_id:
                    type: integer
                  exclude_second_residents_from_resident_count:
                    type: boolean
                  occupants:
                    type: integer
                    description: |
                      How many residents can occupancy this room. This value dictates how many
                      "occupancy points" each resident counts as. For example, if occupants is
                      2, then each resident counts of 0.5 occupancy points
                  second_resident_variant:
                    type: boolean
                    description: |
                      Whether this privacy level supports second residents. Second residents
                      do not impact occupancy points (i.e., they always count as 0 points)
                  second_resident_variant_show_a:
                    type: boolean
                    description: |
                      When `second_resident_variant`, whether the primary resident's unit
                      number has 'A' added as a suffix
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '404':
          description: not_found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '422':
          description: unprocessable_entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      name:
                      - can't be blank
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                privacy_level:
                  type: object
                  properties:
                    community_id:
                      type: integer
                    exclude_second_residents_from_resident_count:
                      type: boolean
                    name:
                      type: string
                    occupants:
                      type: integer
                      description: |
                        How many residents can occupancy this room. This value dictates how many
                        "occupancy points" each resident counts as. For example, if occupants is
                        2, then each resident counts of 0.5 occupancy points
                    second_resident_variant:
                      type: boolean
                      description: |
                        Whether this privacy level supports second residents. Second residents
                        do not impact occupancy points (i.e., they always count as 0 points)
                    second_resident_variant_show_a:
                      type: boolean
                      description: |
                        When `second_resident_variant`, whether the primary resident's unit
                        number has 'A' added as a suffix
                  required:
                  - community_id
                  - name
                  - occupants
              required:
              - privacy_level
        required: true
  "/privacy_levels/{id}":
    put:
      summary: Update Privacy Level
      tags:
      - Privacy Levels
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  community_id:
                    type: integer
                  exclude_second_residents_from_resident_count:
                    type: boolean
                  occupants:
                    type: integer
                    description: |
                      How many residents can occupancy this room. This value dictates how many
                      "occupancy points" each resident counts as. For example, if occupants is
                      2, then each resident counts of 0.5 occupancy points
                  second_resident_variant:
                    type: boolean
                    description: |
                      Whether this privacy level supports second residents. Second residents
                      do not impact occupancy points (i.e., they always count as 0 points)
                  second_resident_variant_show_a:
                    type: boolean
                    description: |
                      When `second_resident_variant`, whether the primary resident's unit
                      number has 'A' added as a suffix
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '404':
          description: not_found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '422':
          description: unprocessable_entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      name:
                      - can't be blank
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                privacy_level:
                  type: object
                  properties:
                    exclude_second_residents_from_resident_count:
                      type: boolean
                    name:
                      type: string
                    occupants:
                      type: integer
                      description: |
                        How many residents can occupancy this room. This value dictates how many
                        "occupancy points" each resident counts as. For example, if occupants is
                        2, then each resident counts of 0.5 occupancy points
                    second_resident_variant:
                      type: boolean
                      description: |
                        Whether this privacy level supports second residents. Second residents
                        do not impact occupancy points (i.e., they always count as 0 points)
                    second_resident_variant_show_a:
                      type: boolean
                      description: |
                        When `second_resident_variant`, whether the primary resident's unit
                        number has 'A' added as a suffix
              required:
              - privacy_level
        required: true
    delete:
      summary: Delete Privacy Level
      tags:
      - Privacy Levels
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: no_content
        '404':
          description: not_found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '422':
          description: unprocessable_entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
  "/prospect_fields":
    get:
      summary: List Prospect Fields
      tags:
      - Prospect Fields
      responses:
        '200':
          description: list prospect fields
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                    field_type:
                      type: string
                      enum:
                      - amount
                      - date
                      - checkbox
                      - single_line_text
                      - paragraph
                      - multi_select_list
                      - single_select_list
                    position:
                      type: integer
                    required:
                      type: boolean
                    show_on_prospect_profile:
                      type: boolean
                    list_options:
                      type: array
                      items:
                        type: string
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
  "/prospect_fields/{id}":
    put:
      summary: Update Prospect Field
      tags:
      - Prospect Fields
      description: |
        Updates a Prospect Field's name, position, required setting, and
        profile visibility.
        For list fields, list_options replaces the complete configured option
        list in the submitted order. Omit list_options to leave the configured
        options unchanged.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: update prospect field
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  field_type:
                    type: string
                    enum:
                    - amount
                    - date
                    - checkbox
                    - single_line_text
                    - paragraph
                    - multi_select_list
                    - single_select_list
                  position:
                    type: integer
                  required:
                    type: boolean
                  show_on_prospect_profile:
                    type: boolean
                  list_options:
                    type: array
                    items:
                      type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '422':
          description: list options are not applicable
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      list_options:
                      - are only available for list fields
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                prospect_field:
                  type: object
                  properties:
                    name:
                      type: string
                    position:
                      type: integer
                    required:
                      type: boolean
                    show_on_prospect_profile:
                      type: boolean
                    list_options:
                      type: array
                      items:
                        type: string
                      description: Only available for list fields
  "/prospects":
    post:
      summary: Create Prospect
      tags:
      - Prospects
      description: |
        The prospects endpoint allows you to add new prospects into WelcomeHome.

        When you add a new prospect, it appear on top of a new prospects
        dashboard. We also send notifications to users via email / mobile push as
        per their preferences.

        A prospect record must have at least one influencer or resident. And at
        least one of those records must have a first or last name. All other
        field are optional and should be omitted if intended to be left blank.
      parameters: []
      responses:
        '201':
          description: Create a prospect
          content:
            application/json:
              schema:
                type: object
                properties:
                  account_id:
                    type: integer
                  active_at:
                    type: string
                    format: date-time
                  close_reason_details:
                    type: string
                  close_reason_id:
                    type: integer
                  community_id:
                    type: integer
                  created_at:
                    type: string
                    format: date-time
                  discarded_at:
                    type: string
                    format: date-time
                  discarded_by_id:
                    type: integer
                  expected_move_timing_id:
                    type: integer
                  id:
                    type: integer
                  initial_contact_at:
                    type: string
                    format: date-time
                  last_contact_at:
                    type: string
                    format: date-time
                  lead_source_id:
                    type: integer
                  metadata:
                    description: |
                      This field stores any arbitrary JSON. It is commonly used to track
                      detailed marketing information e.g., UTM parameters and similar tracking
                      datapoints.

                      The metadata is included whenever Prospects are retrieved via the API,
                      including the Export endpoints. The metadata is intended to be consumed
                      by your BI tool.

                      The maximum allowed size of the metadata JSON is 4kB.
                    example:
                      utm_campaign: campaign-1
                      utm_term: senior living
                    type: object
                  merged_into_prospect_id:
                    type: integer
                  next_activity_scheduled_at:
                    type: string
                    format: date-time
                  original_sales_counselor_id:
                    type: integer
                  referrer_id:
                    type: integer
                  sales_counselor_id:
                    type: integer
                  score_id:
                    type: integer
                  secondary_lead_source_id:
                    type: integer
                  stage_id:
                    type: integer
                  status:
                    description: "Descriptions:\r\n- `open`: An active, sales qualified
                      prospect\r\n- `draft`: A prospect in the process of being added
                      by a user. You should generally\nignore these prospects.\n\r\n-
                      `closed`: A closed/lost prospect\r\n- `moved_in`: A prospect
                      that has moved in at some point. Note this Prospect could\nrepresent
                      a former resident.\n\r\n- `marketing_qualified`: A marketing
                      qualified prospect. These prospects are not visible to users.\n"
                    enum:
                    - open
                    - draft
                    - closed
                    - moved_in
                    - marketing_qualified
                    type: string
                  status_changed_at:
                    type: string
                    format: date-time
                  trait_ids:
                    type: array
                  updated_at:
                    type: string
                    format: date-time
                  residents_attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        person_attributes:
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type: string
                              nullable: true
                            middle_name:
                              type: string
                              nullable: true
                            last_name:
                              type: string
                              nullable: true
                            cell_phone:
                              type: string
                              nullable: true
                            home_phone:
                              type: string
                              nullable: true
                            work_phone:
                              type: string
                              nullable: true
                            email:
                              type: string
                              nullable: true
                            fax_number:
                              type: string
                              nullable: true
                            do_not_call:
                              type: boolean
                              default: false
                            do_not_email:
                              type: boolean
                              default: false
                            do_not_mail:
                              type: boolean
                              default: false
                            do_not_text:
                              type: boolean
                              default: false
                            birthdate:
                              type: string
                              nullable: true
                            provided_age:
                              type: integer
                              nullable: true
                            gender:
                              type: string
                              enum:
                              - male
                              - female
                              nullable: true
                            address_attributes:
                              type: object
                              properties:
                                line1:
                                  type: string
                                  nullable: true
                                line2:
                                  type: string
                                  nullable: true
                                city:
                                  type: string
                                  nullable: true
                                state:
                                  type: string
                                  nullable: true
                                zip:
                                  type: string
                                  nullable: true
                        care_type_id:
                          type: integer
                          nullable: true
                        marital_status:
                          type: string
                          nullable: true
                          enum:
                          - single
                          - married
                          - partnered
                          - widowed
                          - divorced
                        veteran_status:
                          type: string
                          nullable: true
                          enum:
                          - unknown
                          - 'no'
                          - 'yes'
                          - yes_through_living_spouse
                          - yes_through_deceased_spouse
                  influencers_attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        person_attributes:
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type: string
                              nullable: true
                            middle_name:
                              type: string
                              nullable: true
                            last_name:
                              type: string
                              nullable: true
                            cell_phone:
                              type: string
                              nullable: true
                            home_phone:
                              type: string
                              nullable: true
                            work_phone:
                              type: string
                              nullable: true
                            email:
                              type: string
                              nullable: true
                            fax_number:
                              type: string
                              nullable: true
                            do_not_call:
                              type: boolean
                              default: false
                            do_not_email:
                              type: boolean
                              default: false
                            do_not_mail:
                              type: boolean
                              default: false
                            do_not_text:
                              type: boolean
                              default: false
                            birthdate:
                              type: string
                              nullable: true
                            provided_age:
                              type: integer
                              nullable: true
                            gender:
                              type: string
                              enum:
                              - male
                              - female
                              nullable: true
                            address_attributes:
                              type: object
                              properties:
                                line1:
                                  type: string
                                  nullable: true
                                line2:
                                  type: string
                                  nullable: true
                                city:
                                  type: string
                                  nullable: true
                                state:
                                  type: string
                                  nullable: true
                                zip:
                                  type: string
                                  nullable: true
                        decision_maker:
                          type: boolean
                        health_care_proxy:
                          type: boolean
                        notes:
                          type: string
                          nullable: true
                        point_of_contact:
                          type: boolean
                        power_of_attorney:
                          type: boolean
                        relationship_id:
                          type: integer
                          nullable: true
                  prospect_field_values_attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        prospect_field_id:
                          type: integer
                        value:
                          oneOf:
                          - type: string
                          - type: array
                            items:
                              type: string
                          description: |
                            Values must be formatted appropriately for the given field type:

                            - `amount`: a number with optional decimals (e.g., "100" or "100.12")
                            - `date`: DD/MM/YYYY (e.g., "1/1/2001" or "01/01/2001")
                            - `checkbox`: "0" for unchecked, "1" for checked
                            - `single_line_text`: a string with no newlines
                            - `paragraph`: a string that may contain newlines
                            - `multi_select_list`: an array of strings
                            - `single_select_list`: a string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                prospect:
                  type: object
                  properties:
                    community_id:
                      type: integer
                      required: true
                    marketing_touchpoints_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          lead_source_id:
                            type: integer
                          campaign_name:
                            type: string
                          occurred_at:
                            type: string
                            format: date-time
                    residents_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          care_type_id:
                            type: integer
                          person_attributes:
                            type: object
                            properties:
                              first_name:
                                type: string
                                nullable: true
                              middle_name:
                                type: string
                                nullable: true
                              last_name:
                                type: string
                                nullable: true
                              cell_phone:
                                type: string
                                nullable: true
                              home_phone:
                                type: string
                                nullable: true
                              work_phone:
                                type: string
                                nullable: true
                              email:
                                type: string
                                nullable: true
                              fax_number:
                                type: string
                                nullable: true
                              do_not_call:
                                type: boolean
                                default: false
                              do_not_email:
                                type: boolean
                                default: false
                              do_not_mail:
                                type: boolean
                                default: false
                              do_not_text:
                                type: boolean
                                default: false
                              birthdate:
                                type: string
                                nullable: true
                              provided_age:
                                type: integer
                                nullable: true
                              gender:
                                type: string
                                enum:
                                - male
                                - female
                                nullable: true
                              address_attributes:
                                type: object
                                properties:
                                  line1:
                                    type: string
                                    nullable: true
                                  line2:
                                    type: string
                                    nullable: true
                                  city:
                                    type: string
                                    nullable: true
                                  state:
                                    type: string
                                    nullable: true
                                  zip:
                                    type: string
                                    nullable: true
                    influencers_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          notes:
                            type: string
                          person_attributes:
                            type: object
                            properties:
                              first_name:
                                type: string
                                nullable: true
                              middle_name:
                                type: string
                                nullable: true
                              last_name:
                                type: string
                                nullable: true
                              cell_phone:
                                type: string
                                nullable: true
                              home_phone:
                                type: string
                                nullable: true
                              work_phone:
                                type: string
                                nullable: true
                              email:
                                type: string
                                nullable: true
                              fax_number:
                                type: string
                                nullable: true
                              do_not_call:
                                type: boolean
                                default: false
                              do_not_email:
                                type: boolean
                                default: false
                              do_not_mail:
                                type: boolean
                                default: false
                              do_not_text:
                                type: boolean
                                default: false
                              birthdate:
                                type: string
                                nullable: true
                              provided_age:
                                type: integer
                                nullable: true
                              gender:
                                type: string
                                enum:
                                - male
                                - female
                                nullable: true
                              address_attributes:
                                type: object
                                properties:
                                  line1:
                                    type: string
                                    nullable: true
                                  line2:
                                    type: string
                                    nullable: true
                                  city:
                                    type: string
                                    nullable: true
                                  state:
                                    type: string
                                    nullable: true
                                  zip:
                                    type: string
                                    nullable: true
                          relationship_id:
                            type: integer
                    expected_move_timing_id:
                      type: integer
                    lead_source_id:
                      type: integer
                      description: |
                        If your API token has been configured with a default lead
                        source, leave this field blank to use the default, or
                        provide a value to override the default.

                        You can check your lead source default via `GET /api/ping`.
                    secondary_lead_source_id:
                      type: integer
                    metadata:
                      description: |
                        This field stores any arbitrary JSON. It is commonly used to track
                        detailed marketing information e.g., UTM parameters and similar tracking
                        datapoints.

                        The metadata is included whenever Prospects are retrieved via the API,
                        including the Export endpoints. The metadata is intended to be consumed
                        by your BI tool.

                        The maximum allowed size of the metadata JSON is 4kB.
                      example:
                        utm_campaign: campaign-1
                        utm_term: senior living
                      type: object
                    notes:
                      description: |
                        The notes are added to the prospect record as a "note
                        activity", which is stored in the prospect activity log.
                      type: string
                    prospect_field_values_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          prospect_field_id:
                            type: integer
                          value:
                            oneOf:
                            - type: string
                            - type: array
                              items:
                                type: string
                            description: |
                              Values must be formatted appropriately for the given field type:

                              - `amount`: a number with optional decimals (e.g., "100" or "100.12")
                              - `date`: DD/MM/YYYY (e.g., "1/1/2001" or "01/01/2001")
                              - `checkbox`: "0" for unchecked, "1" for checked
                              - `single_line_text`: a string with no newlines
                              - `paragraph`: a string that may contain newlines
                              - `multi_select_list`: an array of strings
                              - `single_select_list`: a string
                    referrer_id:
                      type: integer
                    score_id:
                      type: integer
                      description: Can only be set for prospects in the "open" status
                    status:
                      default: open
                      enum:
                      - open
                      - draft
                      - closed
                      - moved_in
                      - marketing_qualified
                      type: string
                    trait_ids:
                      type: array
                      items:
                        type: integer
                  required:
                  - community_id
  "/prospects/marketing_form":
    post:
      summary: Create or Update Prospect from a Marketing Form
      tags:
      - Prospects
      description: |
        This endpoint is designed to support the type of form you would expect
        to see on a Senior Living community website.

        The endpoint either creates a new prospect or updates an existing one.
        An update occurs if there is already a prospect with a matching email or
        phone number.

        When a new prospect is created, it appears on top of a new prospects
        dashboard. We also send notifications to users via email / mobile push
        as per their preferences.

        See individual field descriptions for more information.
      parameters: []
      responses:
        '200':
          description: Prospect
          content:
            application/json:
              schema:
                type: object
                properties:
                  account_id:
                    type: integer
                  active_at:
                    type: string
                    format: date-time
                  close_reason_details:
                    type: string
                  close_reason_id:
                    type: integer
                  community_id:
                    type: integer
                  created_at:
                    type: string
                    format: date-time
                  discarded_at:
                    type: string
                    format: date-time
                  discarded_by_id:
                    type: integer
                  expected_move_timing_id:
                    type: integer
                  id:
                    type: integer
                  initial_contact_at:
                    type: string
                    format: date-time
                  last_contact_at:
                    type: string
                    format: date-time
                  lead_source_id:
                    type: integer
                  metadata:
                    description: |
                      This field stores any arbitrary JSON. It is commonly used to track
                      detailed marketing information e.g., UTM parameters and similar tracking
                      datapoints.

                      The metadata is included whenever Prospects are retrieved via the API,
                      including the Export endpoints. The metadata is intended to be consumed
                      by your BI tool.

                      The maximum allowed size of the metadata JSON is 4kB.
                    example:
                      utm_campaign: campaign-1
                      utm_term: senior living
                    type: object
                  merged_into_prospect_id:
                    type: integer
                  next_activity_scheduled_at:
                    type: string
                    format: date-time
                  original_sales_counselor_id:
                    type: integer
                  referrer_id:
                    type: integer
                  sales_counselor_id:
                    type: integer
                  score_id:
                    type: integer
                  secondary_lead_source_id:
                    type: integer
                  stage_id:
                    type: integer
                  status:
                    description: "Descriptions:\r\n- `open`: An active, sales qualified
                      prospect\r\n- `draft`: A prospect in the process of being added
                      by a user. You should generally\nignore these prospects.\n\r\n-
                      `closed`: A closed/lost prospect\r\n- `moved_in`: A prospect
                      that has moved in at some point. Note this Prospect could\nrepresent
                      a former resident.\n\r\n- `marketing_qualified`: A marketing
                      qualified prospect. These prospects are not visible to users.\n"
                    enum:
                    - open
                    - draft
                    - closed
                    - moved_in
                    - marketing_qualified
                    type: string
                  status_changed_at:
                    type: string
                    format: date-time
                  trait_ids:
                    type: array
                  updated_at:
                    type: string
                    format: date-time
                  residents_attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        person_attributes:
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type: string
                              nullable: true
                            middle_name:
                              type: string
                              nullable: true
                            last_name:
                              type: string
                              nullable: true
                            cell_phone:
                              type: string
                              nullable: true
                            home_phone:
                              type: string
                              nullable: true
                            work_phone:
                              type: string
                              nullable: true
                            email:
                              type: string
                              nullable: true
                            fax_number:
                              type: string
                              nullable: true
                            do_not_call:
                              type: boolean
                              default: false
                            do_not_email:
                              type: boolean
                              default: false
                            do_not_mail:
                              type: boolean
                              default: false
                            do_not_text:
                              type: boolean
                              default: false
                            birthdate:
                              type: string
                              nullable: true
                            provided_age:
                              type: integer
                              nullable: true
                            gender:
                              type: string
                              enum:
                              - male
                              - female
                              nullable: true
                            address_attributes:
                              type: object
                              properties:
                                line1:
                                  type: string
                                  nullable: true
                                line2:
                                  type: string
                                  nullable: true
                                city:
                                  type: string
                                  nullable: true
                                state:
                                  type: string
                                  nullable: true
                                zip:
                                  type: string
                                  nullable: true
                        care_type_id:
                          type: integer
                          nullable: true
                        marital_status:
                          type: string
                          nullable: true
                          enum:
                          - single
                          - married
                          - partnered
                          - widowed
                          - divorced
                        veteran_status:
                          type: string
                          nullable: true
                          enum:
                          - unknown
                          - 'no'
                          - 'yes'
                          - yes_through_living_spouse
                          - yes_through_deceased_spouse
                  influencers_attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        person_attributes:
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type: string
                              nullable: true
                            middle_name:
                              type: string
                              nullable: true
                            last_name:
                              type: string
                              nullable: true
                            cell_phone:
                              type: string
                              nullable: true
                            home_phone:
                              type: string
                              nullable: true
                            work_phone:
                              type: string
                              nullable: true
                            email:
                              type: string
                              nullable: true
                            fax_number:
                              type: string
                              nullable: true
                            do_not_call:
                              type: boolean
                              default: false
                            do_not_email:
                              type: boolean
                              default: false
                            do_not_mail:
                              type: boolean
                              default: false
                            do_not_text:
                              type: boolean
                              default: false
                            birthdate:
                              type: string
                              nullable: true
                            provided_age:
                              type: integer
                              nullable: true
                            gender:
                              type: string
                              enum:
                              - male
                              - female
                              nullable: true
                            address_attributes:
                              type: object
                              properties:
                                line1:
                                  type: string
                                  nullable: true
                                line2:
                                  type: string
                                  nullable: true
                                city:
                                  type: string
                                  nullable: true
                                state:
                                  type: string
                                  nullable: true
                                zip:
                                  type: string
                                  nullable: true
                        decision_maker:
                          type: boolean
                        health_care_proxy:
                          type: boolean
                        notes:
                          type: string
                          nullable: true
                        point_of_contact:
                          type: boolean
                        power_of_attorney:
                          type: boolean
                        relationship_id:
                          type: integer
                          nullable: true
                  activity_attributes:
                    type: object
                    properties:
                      id:
                        type: integer
                      completed_at:
                        type: string
                        format: date-time
                      direction:
                        type: string
                      notes:
                        type: string
                      sales_counselor_id:
                        type: integer
                      scheduled_at:
                        type: string
                        format: date-time
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      record_type:
                        type: string
                      record_id:
                        type: integer
                      stage_id:
                        type: integer
                      activity_type_id:
                        type: integer
                      discarded_at:
                        type: string
                        format: date-time
                      activity_result_id:
                        type: integer
                      pinned:
                        type: boolean
                      community_id:
                        type: integer
                      created_by_id:
                        type: integer
                      completed_successfully:
                        type: boolean
                      add_to_calendar:
                        type: boolean
                      time_zone:
                        type: string
                        nullable: false
                        example: Eastern Time (US & Canada)
                      calendar_event_start_time:
                        type: string
                        example: '14:00'
                      calendar_event_end_time:
                        type: string
                        example: '15:00'
                      person_ids:
                        type: array
                        items:
                          type: integer
                  marketing_touchpoint_attributes:
                    type: object
                    properties:
                      id:
                        type: integer
                      lead_source_id:
                        type: integer
                      campaign_name:
                        type: string
                      occurred_at:
                        type: string
                        format: date-time
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                marketing_form:
                  type: object
                  properties:
                    community_id:
                      type: integer
                      required: true
                    email:
                      type: string
                    first_name:
                      description: Either first or last name must be provided
                      type: string
                    last_name:
                      type: string
                    lead_source_id:
                      description: |
                        The lead source to assign to the prospect. If one is not
                        provided, the default lead source associated with the API
                        token is used instead.

                        On update, if the prospect already has a lead source, it is
                        not changed in order to maintain the original lead source.
                      type: integer
                    referrer_id:
                      type: integer
                      description: |
                        On update, if the prospect already has a referrer, it is
                        not changed in order to maintain the original referrer.
                    notes:
                      description: |
                        The notes are added to the prospect record as a "note
                        activity", which is stored in the prospect activity log.

                        If an identical note for the same prospect has been created
                        within the past 10 minutes, a new note is not created. This
                        is to handle a scenario where a website visitor submits the
                        form more than once.
                      type: string
                    phone_number:
                      type: string
                      description: Stored as cell phone
                    relationship:
                      type: string
                      description: |
                        A description of who is submitting the form in relation to
                        the prospective Resident.

                        If the downcased value contains the string 'self', then a
                        prospective Resident is created. Otherwise, an Influencer is
                        created. If the account is configured with a Relationship
                        that matches the provided value, then the Relationship is
                        assigned to the Influencer.

                        Note this only applies in a create. If this is an update,
                        then the existing person is not changed from Resident to
                        Influencer or vice versa.
                    do_not_call: 'On update, once the field is true, it cannot be
                      reset to false.

                      '
                    do_not_email: 'On update, once the field is true, it cannot be
                      reset to false.

                      '
                    do_not_text: 'On update, once the field is true, it cannot be
                      reset to false.

                      '
                    do_not_mail: 'On update, once the field is true, it cannot be
                      reset to false.

                      '
                    second_person_first_name:
                      type: string
                      description: |
                        If a second person first or last name is provided, then a
                        person-type opposite of person who submitted the form is
                        created. In other words, if the submitter is a Resident, the
                        second person is an Influencer, or vice versa.
                    second_person_last_name:
                      type: string
                      description: See second person first name for details
                    activity:
                      type: object
                      description: |
                        Optionally create a new activity for the related prospect.

                        If an activity with with same `activity_type_id` and same
                        `notes` has been created within the past 10 minutes, then
                        this activity is not created in order to avoid accidentally
                        creating duplicates.
                      properties:
                        activity_type_id:
                          type: integer
                        completed_at:
                          type: string
                          format: date-time
                          description: If null, activity is scheduled to be performed
                        scheduled_at:
                          type: string
                          format: date-time
                          description: 'Note: users only see the scheduled date, not
                            the time.

                            '
                        pinned:
                          type: boolean
                          description: |
                            Pinned activities are pinned to the top of the completed
                            activities list that users see. They are also displayed
                            along with the life story.
                        notes:
                          type: string
                          description: |
                            Can include basic HTML. Allowed elements:
                            <code>
                            a abbr acronym address b big blockquote br cite code dd del dfn div dl dt em h1 h2 h3 h4 h5 h6 hr i img ins kbd li mark ol p pre samp small span strong sub sup time tt ul var
                            </code>
                        duration_in_minutes:
                          type: integer
                          description: |+
                            The number of minutes the activity should be scheduled
                            for.

                            Using this parameter results in:

                              - scheduling the activity on the user's calendar

                              - showing the start/end time to users in the
                              WelcomeHome UI

                    line1:
                      type: string
                    line2:
                      type: string
                    city:
                      type: string
                    state:
                      type: string
                    zip:
                      type: string
                    care_type_id:
                      type: integer
                    campaign_name:
                      type: string
                  required:
                  - community_id
  "/prospects/names":
    get:
      summary: List Names
      tags:
      - Prospects
      parameters:
      - name: filters[community_id]
        in: query
        required: true
        example: '1'
        schema:
          type: integer
      - name: filters[status]
        in: query
        required: false
        example: open
        default: open
        description: "Descriptions:\r\n- `open`: An active, sales qualified prospect\r\n-
          `draft`: A prospect in the process of being added by a user. You should
          generally\nignore these prospects.\n\r\n- `closed`: A closed/lost prospect\r\n-
          `moved_in`: A prospect that has moved in at some point. Note this Prospect
          could\nrepresent a former resident.\n\r\n- `marketing_qualified`: A marketing
          qualified prospect. These prospects are not visible to users.\n"
        schema:
          type: string
      responses:
        '200':
          description: Matching prospect IDs
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    name:
                      type: string
  "/prospects/search":
    get:
      summary: Search for existing prospects
      tags:
      - Prospects
      description: |
        The search endpoint allows you to search for existing prospects.

        This is particularly useful when wanting to check whether a prospect
        already exists in WelcomeHome in order to avoid creating duplicates.

        The search finds exact (but case-insensitive) matches by name, email,
        and/or phone number.

        The response includes several arrays, each containing the Prospect IDs
        of any matches:

        - `email_matches`: Prospect IDs where at least one resident or
          influencer has a matching email address
        - `name_matches`: Prospect IDs where at least one resident or
          influencer has a matching first and last name
        - `phone_number_matches`: Prospect IDs where at least one resident or
          influencer has a matching cell, home, or work phone number
      parameters:
      - in: query
        name: first_name
        schema:
          type: string
      - in: query
        name: last_name
        schema:
          type: string
      - in: query
        name: email
        schema:
          type: string
      - in: query
        name: phone_number
        schema:
          type: string
      - name: filters[community_id]
        in: query
        required: false
        example: '1'
        schema:
          type: integer
      responses:
        '200':
          description: Matching prospect IDs
          content:
            application/json:
              schema:
                type: object
                properties:
                  email_matches:
                    type: array
                    example:
                    - 123
                  name_matches:
                    type: array
                    example:
                    - 111
                    - 243
                  phone_number_matches:
                    type: array
                    example: []
  "/prospects/search/omni":
    get:
      summary: Omni Search
      tags:
      - Prospects
      description: |
        This search is designed to be useful when wanting to provide
        autocomplete functionality.

        The search finds fuzzy name and email matches, as well as prefix matches
        on phone numbers.
      parameters:
      - name: query
        in: query
        required: true
        schema:
          type: string
      - name: filters[community_id]
        in: query
        required: false
        example: '1'
        schema:
          type: integer
      responses:
        '200':
          description: Matching Prospects
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    prospect_id:
                      type: integer
                    name:
                      type: string
                    email:
                      type: string
                    preferred_phone:
                      type: string
  "/prospects/{id}":
    get:
      summary: Show Prospect
      tags:
      - Prospects
      description: "The show prospects endpoint allows you to view a prospect in WelcomeHome.\n\n"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Show a prospect
          content:
            application/json:
              schema:
                type: object
                properties:
                  account_id:
                    type: integer
                  active_at:
                    type: string
                    format: date-time
                  close_reason_details:
                    type: string
                  close_reason_id:
                    type: integer
                  community_id:
                    type: integer
                  created_at:
                    type: string
                    format: date-time
                  discarded_at:
                    type: string
                    format: date-time
                  discarded_by_id:
                    type: integer
                  expected_move_timing_id:
                    type: integer
                  id:
                    type: integer
                  initial_contact_at:
                    type: string
                    format: date-time
                  last_contact_at:
                    type: string
                    format: date-time
                  lead_source_id:
                    type: integer
                  metadata:
                    description: |
                      This field stores any arbitrary JSON. It is commonly used to track
                      detailed marketing information e.g., UTM parameters and similar tracking
                      datapoints.

                      The metadata is included whenever Prospects are retrieved via the API,
                      including the Export endpoints. The metadata is intended to be consumed
                      by your BI tool.

                      The maximum allowed size of the metadata JSON is 4kB.
                    example:
                      utm_campaign: campaign-1
                      utm_term: senior living
                    type: object
                  merged_into_prospect_id:
                    type: integer
                  next_activity_scheduled_at:
                    type: string
                    format: date-time
                  original_sales_counselor_id:
                    type: integer
                  referrer_id:
                    type: integer
                  sales_counselor_id:
                    type: integer
                  score_id:
                    type: integer
                  secondary_lead_source_id:
                    type: integer
                  stage_id:
                    type: integer
                  status:
                    description: "Descriptions:\r\n- `open`: An active, sales qualified
                      prospect\r\n- `draft`: A prospect in the process of being added
                      by a user. You should generally\nignore these prospects.\n\r\n-
                      `closed`: A closed/lost prospect\r\n- `moved_in`: A prospect
                      that has moved in at some point. Note this Prospect could\nrepresent
                      a former resident.\n\r\n- `marketing_qualified`: A marketing
                      qualified prospect. These prospects are not visible to users.\n"
                    enum:
                    - open
                    - draft
                    - closed
                    - moved_in
                    - marketing_qualified
                    type: string
                  status_changed_at:
                    type: string
                    format: date-time
                  trait_ids:
                    type: array
                  updated_at:
                    type: string
                    format: date-time
                  residents_attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        person_attributes:
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type: string
                              nullable: true
                            middle_name:
                              type: string
                              nullable: true
                            last_name:
                              type: string
                              nullable: true
                            cell_phone:
                              type: string
                              nullable: true
                            home_phone:
                              type: string
                              nullable: true
                            work_phone:
                              type: string
                              nullable: true
                            email:
                              type: string
                              nullable: true
                            fax_number:
                              type: string
                              nullable: true
                            do_not_call:
                              type: boolean
                              default: false
                            do_not_email:
                              type: boolean
                              default: false
                            do_not_mail:
                              type: boolean
                              default: false
                            do_not_text:
                              type: boolean
                              default: false
                            birthdate:
                              type: string
                              nullable: true
                            provided_age:
                              type: integer
                              nullable: true
                            gender:
                              type: string
                              enum:
                              - male
                              - female
                              nullable: true
                            address_attributes:
                              type: object
                              properties:
                                line1:
                                  type: string
                                  nullable: true
                                line2:
                                  type: string
                                  nullable: true
                                city:
                                  type: string
                                  nullable: true
                                state:
                                  type: string
                                  nullable: true
                                zip:
                                  type: string
                                  nullable: true
                        care_type_id:
                          type: integer
                          nullable: true
                        marital_status:
                          type: string
                          nullable: true
                          enum:
                          - single
                          - married
                          - partnered
                          - widowed
                          - divorced
                        veteran_status:
                          type: string
                          nullable: true
                          enum:
                          - unknown
                          - 'no'
                          - 'yes'
                          - yes_through_living_spouse
                          - yes_through_deceased_spouse
                  influencers_attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        person_attributes:
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type: string
                              nullable: true
                            middle_name:
                              type: string
                              nullable: true
                            last_name:
                              type: string
                              nullable: true
                            cell_phone:
                              type: string
                              nullable: true
                            home_phone:
                              type: string
                              nullable: true
                            work_phone:
                              type: string
                              nullable: true
                            email:
                              type: string
                              nullable: true
                            fax_number:
                              type: string
                              nullable: true
                            do_not_call:
                              type: boolean
                              default: false
                            do_not_email:
                              type: boolean
                              default: false
                            do_not_mail:
                              type: boolean
                              default: false
                            do_not_text:
                              type: boolean
                              default: false
                            birthdate:
                              type: string
                              nullable: true
                            provided_age:
                              type: integer
                              nullable: true
                            gender:
                              type: string
                              enum:
                              - male
                              - female
                              nullable: true
                            address_attributes:
                              type: object
                              properties:
                                line1:
                                  type: string
                                  nullable: true
                                line2:
                                  type: string
                                  nullable: true
                                city:
                                  type: string
                                  nullable: true
                                state:
                                  type: string
                                  nullable: true
                                zip:
                                  type: string
                                  nullable: true
                        decision_maker:
                          type: boolean
                        health_care_proxy:
                          type: boolean
                        notes:
                          type: string
                          nullable: true
                        point_of_contact:
                          type: boolean
                        power_of_attorney:
                          type: boolean
                        relationship_id:
                          type: integer
                          nullable: true
                  prospect_field_values_attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        prospect_field_id:
                          type: integer
                        value:
                          oneOf:
                          - type: string
                          - type: array
                            items:
                              type: string
                          description: |
                            Values must be formatted appropriately for the given field type:

                            - `amount`: a number with optional decimals (e.g., "100" or "100.12")
                            - `date`: DD/MM/YYYY (e.g., "1/1/2001" or "01/01/2001")
                            - `checkbox`: "0" for unchecked, "1" for checked
                            - `single_line_text`: a string with no newlines
                            - `paragraph`: a string that may contain newlines
                            - `multi_select_list`: an array of strings
                            - `single_select_list`: a string
    put:
      summary: Update Prospect
      tags:
      - Prospects
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Show a prospect
          content:
            application/json:
              schema:
                type: object
                properties:
                  account_id:
                    type: integer
                  active_at:
                    type: string
                    format: date-time
                  close_reason_details:
                    type: string
                  close_reason_id:
                    type: integer
                  community_id:
                    type: integer
                  created_at:
                    type: string
                    format: date-time
                  discarded_at:
                    type: string
                    format: date-time
                  discarded_by_id:
                    type: integer
                  expected_move_timing_id:
                    type: integer
                  id:
                    type: integer
                  initial_contact_at:
                    type: string
                    format: date-time
                  last_contact_at:
                    type: string
                    format: date-time
                  lead_source_id:
                    type: integer
                  metadata:
                    description: |
                      This field stores any arbitrary JSON. It is commonly used to track
                      detailed marketing information e.g., UTM parameters and similar tracking
                      datapoints.

                      The metadata is included whenever Prospects are retrieved via the API,
                      including the Export endpoints. The metadata is intended to be consumed
                      by your BI tool.

                      The maximum allowed size of the metadata JSON is 4kB.
                    example:
                      utm_campaign: campaign-1
                      utm_term: senior living
                    type: object
                  merged_into_prospect_id:
                    type: integer
                  next_activity_scheduled_at:
                    type: string
                    format: date-time
                  original_sales_counselor_id:
                    type: integer
                  referrer_id:
                    type: integer
                  sales_counselor_id:
                    type: integer
                  score_id:
                    type: integer
                  secondary_lead_source_id:
                    type: integer
                  stage_id:
                    type: integer
                  status:
                    description: "Descriptions:\r\n- `open`: An active, sales qualified
                      prospect\r\n- `draft`: A prospect in the process of being added
                      by a user. You should generally\nignore these prospects.\n\r\n-
                      `closed`: A closed/lost prospect\r\n- `moved_in`: A prospect
                      that has moved in at some point. Note this Prospect could\nrepresent
                      a former resident.\n\r\n- `marketing_qualified`: A marketing
                      qualified prospect. These prospects are not visible to users.\n"
                    enum:
                    - open
                    - draft
                    - closed
                    - moved_in
                    - marketing_qualified
                    type: string
                  status_changed_at:
                    type: string
                    format: date-time
                  trait_ids:
                    type: array
                  updated_at:
                    type: string
                    format: date-time
                  residents_attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        person_attributes:
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type: string
                              nullable: true
                            middle_name:
                              type: string
                              nullable: true
                            last_name:
                              type: string
                              nullable: true
                            cell_phone:
                              type: string
                              nullable: true
                            home_phone:
                              type: string
                              nullable: true
                            work_phone:
                              type: string
                              nullable: true
                            email:
                              type: string
                              nullable: true
                            fax_number:
                              type: string
                              nullable: true
                            do_not_call:
                              type: boolean
                              default: false
                            do_not_email:
                              type: boolean
                              default: false
                            do_not_mail:
                              type: boolean
                              default: false
                            do_not_text:
                              type: boolean
                              default: false
                            birthdate:
                              type: string
                              nullable: true
                            provided_age:
                              type: integer
                              nullable: true
                            gender:
                              type: string
                              enum:
                              - male
                              - female
                              nullable: true
                            address_attributes:
                              type: object
                              properties:
                                line1:
                                  type: string
                                  nullable: true
                                line2:
                                  type: string
                                  nullable: true
                                city:
                                  type: string
                                  nullable: true
                                state:
                                  type: string
                                  nullable: true
                                zip:
                                  type: string
                                  nullable: true
                        care_type_id:
                          type: integer
                          nullable: true
                        marital_status:
                          type: string
                          nullable: true
                          enum:
                          - single
                          - married
                          - partnered
                          - widowed
                          - divorced
                        veteran_status:
                          type: string
                          nullable: true
                          enum:
                          - unknown
                          - 'no'
                          - 'yes'
                          - yes_through_living_spouse
                          - yes_through_deceased_spouse
                  influencers_attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        person_attributes:
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type: string
                              nullable: true
                            middle_name:
                              type: string
                              nullable: true
                            last_name:
                              type: string
                              nullable: true
                            cell_phone:
                              type: string
                              nullable: true
                            home_phone:
                              type: string
                              nullable: true
                            work_phone:
                              type: string
                              nullable: true
                            email:
                              type: string
                              nullable: true
                            fax_number:
                              type: string
                              nullable: true
                            do_not_call:
                              type: boolean
                              default: false
                            do_not_email:
                              type: boolean
                              default: false
                            do_not_mail:
                              type: boolean
                              default: false
                            do_not_text:
                              type: boolean
                              default: false
                            birthdate:
                              type: string
                              nullable: true
                            provided_age:
                              type: integer
                              nullable: true
                            gender:
                              type: string
                              enum:
                              - male
                              - female
                              nullable: true
                            address_attributes:
                              type: object
                              properties:
                                line1:
                                  type: string
                                  nullable: true
                                line2:
                                  type: string
                                  nullable: true
                                city:
                                  type: string
                                  nullable: true
                                state:
                                  type: string
                                  nullable: true
                                zip:
                                  type: string
                                  nullable: true
                        decision_maker:
                          type: boolean
                        health_care_proxy:
                          type: boolean
                        notes:
                          type: string
                          nullable: true
                        point_of_contact:
                          type: boolean
                        power_of_attorney:
                          type: boolean
                        relationship_id:
                          type: integer
                          nullable: true
                  prospect_field_values_attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        prospect_field_id:
                          type: integer
                        value:
                          oneOf:
                          - type: string
                          - type: array
                            items:
                              type: string
                          description: |
                            Values must be formatted appropriately for the given field type:

                            - `amount`: a number with optional decimals (e.g., "100" or "100.12")
                            - `date`: DD/MM/YYYY (e.g., "1/1/2001" or "01/01/2001")
                            - `checkbox`: "0" for unchecked, "1" for checked
                            - `single_line_text`: a string with no newlines
                            - `paragraph`: a string that may contain newlines
                            - `multi_select_list`: an array of strings
                            - `single_select_list`: a string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                prospect:
                  type: object
                  properties:
                    marketing_touchpoints_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          lead_source_id:
                            type: integer
                          campaign_name:
                            type: string
                          occurred_at:
                            type: string
                            format: date-time
                    residents_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          care_type_id:
                            type: integer
                          person_attributes:
                            type: object
                            properties:
                              first_name:
                                type: string
                                nullable: true
                              middle_name:
                                type: string
                                nullable: true
                              last_name:
                                type: string
                                nullable: true
                              cell_phone:
                                type: string
                                nullable: true
                              home_phone:
                                type: string
                                nullable: true
                              work_phone:
                                type: string
                                nullable: true
                              email:
                                type: string
                                nullable: true
                              fax_number:
                                type: string
                                nullable: true
                              do_not_call:
                                type: boolean
                                default: false
                              do_not_email:
                                type: boolean
                                default: false
                              do_not_mail:
                                type: boolean
                                default: false
                              do_not_text:
                                type: boolean
                                default: false
                              birthdate:
                                type: string
                                nullable: true
                              provided_age:
                                type: integer
                                nullable: true
                              gender:
                                type: string
                                enum:
                                - male
                                - female
                                nullable: true
                              address_attributes:
                                type: object
                                properties:
                                  line1:
                                    type: string
                                    nullable: true
                                  line2:
                                    type: string
                                    nullable: true
                                  city:
                                    type: string
                                    nullable: true
                                  state:
                                    type: string
                                    nullable: true
                                  zip:
                                    type: string
                                    nullable: true
                    influencers_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          notes:
                            type: string
                          person_attributes:
                            type: object
                            properties:
                              first_name:
                                type: string
                                nullable: true
                              middle_name:
                                type: string
                                nullable: true
                              last_name:
                                type: string
                                nullable: true
                              cell_phone:
                                type: string
                                nullable: true
                              home_phone:
                                type: string
                                nullable: true
                              work_phone:
                                type: string
                                nullable: true
                              email:
                                type: string
                                nullable: true
                              fax_number:
                                type: string
                                nullable: true
                              do_not_call:
                                type: boolean
                                default: false
                              do_not_email:
                                type: boolean
                                default: false
                              do_not_mail:
                                type: boolean
                                default: false
                              do_not_text:
                                type: boolean
                                default: false
                              birthdate:
                                type: string
                                nullable: true
                              provided_age:
                                type: integer
                                nullable: true
                              gender:
                                type: string
                                enum:
                                - male
                                - female
                                nullable: true
                              address_attributes:
                                type: object
                                properties:
                                  line1:
                                    type: string
                                    nullable: true
                                  line2:
                                    type: string
                                    nullable: true
                                  city:
                                    type: string
                                    nullable: true
                                  state:
                                    type: string
                                    nullable: true
                                  zip:
                                    type: string
                                    nullable: true
                          relationship_id:
                            type: integer
                    expected_move_timing_id:
                      type: integer
                    lead_source_id:
                      type: integer
                    secondary_lead_source_id:
                      type: integer
                    metadata:
                      description: |
                        This field stores any arbitrary JSON. It is commonly used to track
                        detailed marketing information e.g., UTM parameters and similar tracking
                        datapoints.

                        The metadata is included whenever Prospects are retrieved via the API,
                        including the Export endpoints. The metadata is intended to be consumed
                        by your BI tool.

                        The maximum allowed size of the metadata JSON is 4kB.

                        On update, metadata is shallowly merged by top-level key. In these examples,
                        Before and After show the stored metadata, while Request shows only the
                        relevant request body.

                        - Add or replace supplied non-null keys while preserving omitted keys.

                          Before:
                          ```json
                          {"owner": "partner-a", "status": "old"}
                          ```

                          Request:
                          ```json
                          {"metadata": {"document_id": "123", "status": "new"}}
                          ```

                          After:
                          ```json
                          {"document_id": "123", "owner": "partner-a", "status": "new"}
                          ```

                        - Remove supplied null-valued keys. Null for a missing key has no effect.

                          Before:
                          ```json
                          {"keep": "value", "remove": "value"}
                          ```

                          Request:
                          ```json
                          {"metadata": {"missing": null, "remove": null}}
                          ```

                          After:
                          ```json
                          {"keep": "value"}
                          ```

                        - Replace a complete nested object rather than recursively merging it.

                          Before:
                          ```json
                          {"details": {"first": "value", "second": "old"}}
                          ```

                          Request:
                          ```json
                          {"metadata": {"details": {"second": "new"}}}
                          ```

                          After:
                          ```json
                          {"details": {"second": "new"}}
                          ```

                        - Leave metadata unchanged when supplied an empty object.

                          Before:
                          ```json
                          {"owner": "partner-a"}
                          ```

                          Request:
                          ```json
                          {"metadata": {}}
                          ```

                          After:
                          ```json
                          {"owner": "partner-a"}
                          ```

                        - Reset metadata to an empty object when supplied top-level null.

                          Before:
                          ```json
                          {"owner": "partner-a"}
                          ```

                          Request:
                          ```json
                          {"metadata": null}
                          ```

                          After:
                          ```json
                          {}
                          ```
                      example:
                        utm_campaign: campaign-1
                        utm_term: senior living
                      type: object
                      nullable: true
                    notes:
                      description: |
                        The notes are added to the prospect record as a "note
                        activity", which is stored in the prospect activity log.
                      type: string
                    prospect_field_values_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          prospect_field_id:
                            type: integer
                          value:
                            oneOf:
                            - type: string
                            - type: array
                              items:
                                type: string
                            description: |
                              Values must be formatted appropriately for the given field type:

                              - `amount`: a number with optional decimals (e.g., "100" or "100.12")
                              - `date`: DD/MM/YYYY (e.g., "1/1/2001" or "01/01/2001")
                              - `checkbox`: "0" for unchecked, "1" for checked
                              - `single_line_text`: a string with no newlines
                              - `paragraph`: a string that may contain newlines
                              - `multi_select_list`: an array of strings
                              - `single_select_list`: a string
                    referrer_id:
                      type: integer
                    score_id:
                      type: integer
                      description: Can only be set for prospects in the "open" status
                    status:
                      default: open
                      enum:
                      - open
                      - draft
                      - closed
                      - moved_in
                      - marketing_qualified
                      type: string
                    trait_ids:
                      type: array
                      items:
                        type: integer
  "/prospects/{prospect_id}/attachments":
    get:
      summary: List prospect attachments
      tags:
      - Prospects
      parameters:
      - name: prospect_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: list attachments
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    attachment_url:
                      type: string
                    byte_size:
                      type: integer
                    filename:
                      type: string
                    title:
                      type: string
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
                    discarded_at:
                      type: string
                      format: date-time
    post:
      summary: Create prospect attachment
      tags:
      - Prospects
      description: |
        Example Request:

        ```
        curl https://crm.welcomehomesoftware.com/api/prospects/1/attachments \
          -H "Authorization: Token token={TOKEN}" \
          -F "attachment[file]=@path/to/file" \
          -F "attachment[title]=DocTitle"
        ```
      parameters: []
      responses:
        '201':
          description: attachment
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  attachment_url:
                    type: string
                  byte_size:
                    type: integer
                  filename:
                    type: string
                  title:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  discarded_at:
                    type: string
                    format: date-time
        '422':
          description: attachment
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      file:
                      - can't be blank
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                attachment:
                  properties:
                    file:
                      type: string
                      format: binary
                    title:
                      type: string
                  required:
                  - file
  "/relationships":
    get:
      summary: List Relationships
      tags:
      - Relationships
      responses:
        '200':
          description: list relationships
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                      example: Daughter
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
  "/residents/{id}":
    get:
      summary: Show Resident
      tags:
      - Residents
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  prospect_id:
                    type: integer
                  person_attributes:
                    properties:
                      id:
                        type: integer
                      first_name:
                        type: string
                        nullable: true
                      middle_name:
                        type: string
                        nullable: true
                      last_name:
                        type: string
                        nullable: true
                      cell_phone:
                        type: string
                        nullable: true
                      home_phone:
                        type: string
                        nullable: true
                      work_phone:
                        type: string
                        nullable: true
                      email:
                        type: string
                        nullable: true
                      fax_number:
                        type: string
                        nullable: true
                      do_not_call:
                        type: boolean
                        default: false
                      do_not_email:
                        type: boolean
                        default: false
                      do_not_mail:
                        type: boolean
                        default: false
                      do_not_text:
                        type: boolean
                        default: false
                      birthdate:
                        type: string
                        nullable: true
                      provided_age:
                        type: integer
                        nullable: true
                      gender:
                        type: string
                        enum:
                        - male
                        - female
                        nullable: true
                      address_attributes:
                        type: object
                        properties:
                          line1:
                            type: string
                            nullable: true
                          line2:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          state:
                            type: string
                            nullable: true
                          zip:
                            type: string
                            nullable: true
                    type: object
                  care_type_id:
                    type: integer
                    nullable: true
                  marital_status:
                    type: string
                    nullable: true
                    enum:
                    - single
                    - married
                    - partnered
                    - widowed
                    - divorced
                  veteran_status:
                    type: string
                    nullable: true
                    enum:
                    - unknown
                    - 'no'
                    - 'yes'
                    - yes_through_living_spouse
                    - yes_through_deceased_spouse
    put:
      summary: Update Resident
      tags:
      - Residents
      description: |
        The residents endpoint allows you to update certain data points for
        residents in WelcomeHome.

        The permitted data points relate to marital status, birthdate, age, gender, and address.
      parameters: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  prospect_id:
                    type: integer
                  person_attributes:
                    properties:
                      id:
                        type: integer
                      first_name:
                        type: string
                        nullable: true
                      middle_name:
                        type: string
                        nullable: true
                      last_name:
                        type: string
                        nullable: true
                      cell_phone:
                        type: string
                        nullable: true
                      home_phone:
                        type: string
                        nullable: true
                      work_phone:
                        type: string
                        nullable: true
                      email:
                        type: string
                        nullable: true
                      fax_number:
                        type: string
                        nullable: true
                      do_not_call:
                        type: boolean
                        default: false
                      do_not_email:
                        type: boolean
                        default: false
                      do_not_mail:
                        type: boolean
                        default: false
                      do_not_text:
                        type: boolean
                        default: false
                      birthdate:
                        type: string
                        nullable: true
                      provided_age:
                        type: integer
                        nullable: true
                      gender:
                        type: string
                        enum:
                        - male
                        - female
                        nullable: true
                      address_attributes:
                        type: object
                        properties:
                          line1:
                            type: string
                            nullable: true
                          line2:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          state:
                            type: string
                            nullable: true
                          zip:
                            type: string
                            nullable: true
                    type: object
                  care_type_id:
                    type: integer
                    nullable: true
                  marital_status:
                    type: string
                    nullable: true
                    enum:
                    - single
                    - married
                    - partnered
                    - widowed
                    - divorced
                  veteran_status:
                    type: string
                    nullable: true
                    enum:
                    - unknown
                    - 'no'
                    - 'yes'
                    - yes_through_living_spouse
                    - yes_through_deceased_spouse
        '422':
          description: unprocessable_entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      person.provided_age:
                      - must be less than 200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                resident:
                  properties:
                    care_type_id:
                      type: integer
                      nullable: true
                    marital_status:
                      type: string
                      nullable: true
                      enum:
                      - single
                      - married
                      - partnered
                      - widowed
                      - divorced
                    person_attributes:
                      type: object
                      properties:
                        first_name:
                          type: string
                          nullable: true
                        middle_name:
                          type: string
                          nullable: true
                        last_name:
                          type: string
                          nullable: true
                        cell_phone:
                          type: string
                          nullable: true
                        home_phone:
                          type: string
                          nullable: true
                        work_phone:
                          type: string
                          nullable: true
                        email:
                          type: string
                          nullable: true
                        fax_number:
                          type: string
                          nullable: true
                        do_not_call:
                          type: boolean
                          default: false
                        do_not_email:
                          type: boolean
                          default: false
                        do_not_mail:
                          type: boolean
                          default: false
                        do_not_text:
                          type: boolean
                          default: false
                        birthdate:
                          type: string
                          nullable: true
                        provided_age:
                          type: integer
                          nullable: true
                        gender:
                          type: string
                          enum:
                          - male
                          - female
                          nullable: true
                        address_attributes:
                          type: object
                          properties:
                            line1:
                              type: string
                              nullable: true
                            line2:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            state:
                              type: string
                              nullable: true
                            zip:
                              type: string
                              nullable: true
                    veteran_status:
                      type: string
                      nullable: true
                      enum:
                      - unknown
                      - 'no'
                      - 'yes'
                      - yes_through_living_spouse
                      - yes_through_deceased_spouse
  "/scores":
    get:
      summary: List Scores
      tags:
      - Scores
      responses:
        '200':
          description: list scores
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                    position:
                      type: integer
                    for_referrers:
                      type: boolean
                    for_prospects:
                      type: boolean
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
  "/stages":
    get:
      summary: List Stages
      tags:
      - Stages
      responses:
        '200':
          description: list stages
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                      example: New Lead
                    position:
                      type: integer
                      example: 0
                    system_type:
                      type: string
                      example: new_lead
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
  "/traits":
    get:
      summary: List Traits
      tags:
      - Traits
      responses:
        '200':
          description: list traits
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                      example: Affordability
                    trait_category:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                          example: Decision Criteria
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
  "/units/{unit_id}/market_rates":
    parameters:
    - name: unit_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List Unit Market Rates
      tags:
      - Unit Market Rates
      responses:
        '200':
          description: market rates
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    start_date:
                      type: string
                      format: date
                      nullable: true
                    market_rate:
                      type: decimal
                    second_resident_market_rate:
                      type: decimal
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
        '404':
          description: unit not found
    post:
      summary: Create Unit Market Rate
      description: Omitted rates default to zero.
      tags:
      - Unit Market Rates
      parameters: []
      responses:
        '201':
          description: market rate
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  start_date:
                    type: string
                    format: date
                    nullable: true
                  market_rate:
                    type: decimal
                  second_resident_market_rate:
                    type: decimal
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '422':
          description: invalid market rate
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      start_date:
                      - has already been taken
        '404':
          description: unit not found
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - market_rate
              properties:
                market_rate:
                  type: object
                  properties:
                    start_date:
                      type: string
                      format: date
                      nullable: true
                    market_rate:
                      type: decimal
                    second_resident_market_rate:
                      type: decimal
        required: true
  "/units/{unit_id}/market_rates/{id}":
    parameters:
    - name: unit_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    put:
      summary: Update Unit Market Rate
      tags:
      - Unit Market Rates
      parameters: []
      responses:
        '200':
          description: market rate
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  start_date:
                    type: string
                    format: date
                    nullable: true
                  market_rate:
                    type: decimal
                  second_resident_market_rate:
                    type: decimal
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '422':
          description: invalid market rate
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      start_date:
                      - has already been taken
        '404':
          description: unit or market rate not found
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - market_rate
              properties:
                market_rate:
                  type: object
                  properties:
                    start_date:
                      type: string
                      format: date
                      nullable: true
                    market_rate:
                      type: decimal
                    second_resident_market_rate:
                      type: decimal
        required: true
    delete:
      summary: Delete Unit Market Rate
      tags:
      - Unit Market Rates
      responses:
        '204':
          description: market rate deleted
        '404':
          description: unit or market rate not found
  "/units":
    get:
      summary: List Units
      tags:
      - Units
      parameters:
      - name: filters[community_id]
        in: query
        required: false
        example: '1'
        schema:
          type: integer
      - name: include_market_rate_for_date
        in: query
        required: false
        example: today
        schema:
          type: date
      responses:
        '200':
          description: list units
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    number:
                      type: string
                    floor:
                      type: string
                    amenities:
                      type: array
                      items:
                        type: string
                    care_type_id:
                      type: integer
                    community_id:
                      type: integer
                    default_privacy_level_id:
                      type: integer
                      nullable: true
                    floor_plan_id:
                      type: integer
                    notes:
                      type: string
                    off_census:
                      type: boolean
                    square_feet:
                      type: integer
                      nullable: true
                    created_at:
                      type: string
                      format: date-time
                    discarded_at:
                      type: string
                      format: date-time
                      nullable: true
                    updated_at:
                      type: string
                      format: date-time
                    market_rate:
                      description: present only when include_market_rate_for_date
                        is provided.
                      type: decimal
                      default: 0.0
                    second_resident_market_rate:
                      description: present only when include_market_rate_for_date
                        is provided.
                      type: decimal
                      default: 0.0
    post:
      summary: Create Unit
      tags:
      - Units
      parameters: []
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  floor:
                    type: string
                  amenities:
                    type: array
                    items:
                      type: string
                  care_type_id:
                    type: integer
                  community_id:
                    type: integer
                  default_privacy_level_id:
                    type: integer
                    nullable: true
                  floor_plan_id:
                    type: integer
                  notes:
                    type: string
                  off_census:
                    type: boolean
                  square_feet:
                    type: integer
                    nullable: true
                  created_at:
                    type: string
                    format: date-time
                  discarded_at:
                    type: string
                    format: date-time
                    nullable: true
                  updated_at:
                    type: string
                    format: date-time
        '422':
          description: unprocessable_entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      number:
                      - can't be blank
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                unit:
                  type: object
                  properties:
                    community_id:
                      type: integer
                    number:
                      type: string
                    floor:
                      type: string
                    floor_plan_id:
                      type: integer
                    care_type_id:
                      type: integer
                    default_privacy_level_id:
                      type: integer
                      nullable: true
                    square_feet:
                      type: integer
                      nullable: true
                    off_census:
                      type: boolean
                    notes:
                      type: string
                    amenities:
                      type: array
                      items:
                        type: string
                  required:
                  - community_id
                  - number
                  - floor_plan_id
                  - care_type_id
  "/units/{id}":
    get:
      summary: Show Unit
      tags:
      - Units
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      - name: include_market_rate_for_date
        in: query
        required: false
        example: today
        schema:
          type: date
      responses:
        '200':
          description: show unit
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  floor:
                    type: string
                  amenities:
                    type: array
                    items:
                      type: string
                  care_type_id:
                    type: integer
                  community_id:
                    type: integer
                  default_privacy_level_id:
                    type: integer
                    nullable: true
                  floor_plan_id:
                    type: integer
                  notes:
                    type: string
                  off_census:
                    type: boolean
                  square_feet:
                    type: integer
                    nullable: true
                  created_at:
                    type: string
                    format: date-time
                  discarded_at:
                    type: string
                    format: date-time
                    nullable: true
                  updated_at:
                    type: string
                    format: date-time
                  market_rate:
                    description: present only when include_market_rate_for_date is
                      provided.
                    type: decimal
                    default: 0.0
                  second_resident_market_rate:
                    description: present only when include_market_rate_for_date is
                      provided.
                    type: decimal
                    default: 0.0
    put:
      summary: Update Unit
      tags:
      - Units
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  floor:
                    type: string
                  amenities:
                    type: array
                    items:
                      type: string
                  care_type_id:
                    type: integer
                  community_id:
                    type: integer
                  default_privacy_level_id:
                    type: integer
                    nullable: true
                  floor_plan_id:
                    type: integer
                  notes:
                    type: string
                  off_census:
                    type: boolean
                  square_feet:
                    type: integer
                    nullable: true
                  created_at:
                    type: string
                    format: date-time
                  discarded_at:
                    type: string
                    format: date-time
                    nullable: true
                  updated_at:
                    type: string
                    format: date-time
        '422':
          description: unprocessable_entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      number:
                      - can't be blank
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                unit:
                  type: object
                  properties:
                    number:
                      type: string
                    floor:
                      type: string
                    floor_plan_id:
                      type: integer
                    care_type_id:
                      type: integer
                    default_privacy_level_id:
                      type: integer
                      nullable: true
                    square_feet:
                      type: integer
                      nullable: true
                    off_census:
                      type: boolean
                    notes:
                      type: string
                    amenities:
                      type: array
                      items:
                        type: string
  "/user_roles":
    get:
      summary: List User Roles
      tags:
      - User Roles
      parameters:
      - name: filters[community_id]
        in: query
        required: false
        example: '1'
        schema:
          type: integer
      - name: filters[user_id]
        in: query
        required: false
        example: '1'
        schema:
          type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    community_id:
                      type: integer
                    user_id:
                      type: integer
                    role:
                      type: string
                      enum:
                      - sales_director
                      - executive_director
                      - wellness_director
                      - other
                    title:
                      type: string
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
    post:
      summary: Create User Role
      tags:
      - User Roles
      parameters: []
      responses:
        '201':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  community_id:
                    type: integer
                  user_id:
                    type: integer
                  role:
                    type: string
                    enum:
                    - sales_director
                    - executive_director
                    - wellness_director
                    - other
                  title:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '422':
          description: unprocessable_entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      role:
                      - 'must be one of these values: sales_director, executive_director,
                        wellness_director, other'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_role:
                  properties:
                    community_id:
                      type: integer
                    user_id:
                      type: integer
                    role:
                      type: string
                      enum:
                      - sales_director
                      - executive_director
                      - wellness_director
                      - other
                    title:
                      type: string
                  required:
                  - community_id
                  - user_id
                  - role
                  - title
  "/user_roles/{id}":
    get:
      summary: Show User Role
      tags:
      - User Roles
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  community_id:
                    type: integer
                  user_id:
                    type: integer
                  role:
                    type: string
                    enum:
                    - sales_director
                    - executive_director
                    - wellness_director
                    - other
                  title:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
    put:
      summary: Update User Role
      tags:
      - User Roles
      parameters: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  community_id:
                    type: integer
                  user_id:
                    type: integer
                  role:
                    type: string
                    enum:
                    - sales_director
                    - executive_director
                    - wellness_director
                    - other
                  title:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '422':
          description: unprocessable_entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      role:
                      - 'must be one of these values: sales_director, executive_director,
                        wellness_director, other'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_role:
                  properties:
                    community_id:
                      type: integer
                    user_id:
                      type: integer
                    role:
                      type: string
                      enum:
                      - sales_director
                      - executive_director
                      - wellness_director
                      - other
                    title:
                      type: string
    delete:
      summary: Delete User Role
      tags:
      - User Roles
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: success
          content:
            application/json:
              schema:
                schema:
                  type: string
        '404':
          description: not_found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Record not found
  "/users/{user_id}/phone_numbers":
    get:
      summary: List Phone Numbers
      description: Requires an API Token with access to all communities
      tags:
      - Phone Numbers
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: list phone_numbers
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    number:
                      type: string
                    label:
                      type: string
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
    post:
      summary: Create Phone Number
      description: Requires an API Token with access to all communities
      tags:
      - Phone Numbers
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '201':
          description: phone_number
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  label:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '422':
          description: phone_number
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      label:
                      - can't be blank
                      number:
                      - can't be blank
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                phone_number:
                  properties:
                    number:
                      type: string
                    label:
                      type: string
                  required:
                  - number
                  - label
  "/users/{user_id}/phone_numbers/{id}":
    get:
      summary: Show Phone Number
      description: Requires an API Token with access to all communities
      tags:
      - Phone Numbers
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: phone_number
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  label:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
    put:
      summary: Update Phone Number
      description: Requires an API Token with access to all communities
      tags:
      - Phone Numbers
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: phone_number
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  label:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '422':
          description: phone_number
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      label:
                      - can't be blank
                      number:
                      - can't be blank
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                phone_number:
                  properties:
                    number:
                      type: string
                    label:
                      type: string
                  required:
                  - number
                  - label
    delete:
      summary: Delete Phone Number
      description: Requires an API Token with access to all communities
      tags:
      - Phone Numbers
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: phone_number
          content:
            application/json:
              schema:
                schema:
                  type: string
        '404':
          description: phone_number
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Record not found
  "/users":
    get:
      summary: List Users
      description: Requires an API Token with access to all communities
      tags:
      - Users
      responses:
        '200':
          description: list users
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    email:
                      type: string
                    first_name:
                      type: string
                    last_name:
                      type: string
                    role:
                      type: string
                      enum:
                      - user
                      - admin
                      - regional
                      - notification_only
                      - user_manager
                      - read_only
                    community_ids:
                      description: 'Communities this user has access to. Not needed
                        for `admin` role users

                        '
                      type: array
                      items:
                        type: integer
                    all_communities:
                      description: |
                        Set to `true` if user should have access to all communities (including
                        new communities added in the future). There is no need to set individual
                        `community_ids` when using this option.

                        If setting individual `community_ids` and `all_communities` is not
                        provided, it will automatically be set to `false`.

                        If setting `community_ids` to an empty array and `all_communities` is
                        not provided, it will automatically be set to `true`. To make a user
                        with access to no communities, be sure to set `{ "community_ids": [],
                        "all_communities": false }`.
                      type: boolean
                    created_at:
                      type: string
                      format: date-time
                    deactivated_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
    post:
      summary: Create User
      description: Requires an API Token with access to all communities
      tags:
      - Users
      parameters: []
      responses:
        '201':
          description: user
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  email:
                    type: string
                  first_name:
                    type: string
                  last_name:
                    type: string
                  role:
                    type: string
                    enum:
                    - user
                    - admin
                    - regional
                    - notification_only
                    - user_manager
                    - read_only
                  community_ids:
                    description: 'Communities this user has access to. Not needed
                      for `admin` role users

                      '
                    type: array
                    items:
                      type: integer
                  all_communities:
                    description: |
                      Set to `true` if user should have access to all communities (including
                      new communities added in the future). There is no need to set individual
                      `community_ids` when using this option.

                      If setting individual `community_ids` and `all_communities` is not
                      provided, it will automatically be set to `false`.

                      If setting `community_ids` to an empty array and `all_communities` is
                      not provided, it will automatically be set to `true`. To make a user
                      with access to no communities, be sure to set `{ "community_ids": [],
                      "all_communities": false }`.
                    type: boolean
                  created_at:
                    type: string
                    format: date-time
                  deactivated_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '422':
          description: user
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      user.email:
                      - can't be blank
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  properties:
                    email:
                      type: string
                    first_name:
                      type: string
                    last_name:
                      type: string
                    role:
                      type: string
                      enum:
                      - user
                      - admin
                      - regional
                      - notification_only
                      - user_manager
                      - read_only
                    community_ids:
                      description: 'Communities this user has access to. Not needed
                        for `admin` role users

                        '
                      type: array
                      items:
                        type: integer
                    all_communities:
                      description: |
                        Set to `true` if user should have access to all communities (including
                        new communities added in the future). There is no need to set individual
                        `community_ids` when using this option.

                        If setting individual `community_ids` and `all_communities` is not
                        provided, it will automatically be set to `false`.

                        If setting `community_ids` to an empty array and `all_communities` is
                        not provided, it will automatically be set to `true`. To make a user
                        with access to no communities, be sure to set `{ "community_ids": [],
                        "all_communities": false }`.
                      type: boolean
                  required:
                  - email
  "/users/{id}":
    get:
      summary: Show User
      description: Requires an API Token with access to all communities
      tags:
      - Users
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: user
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  email:
                    type: string
                  first_name:
                    type: string
                  last_name:
                    type: string
                  role:
                    type: string
                    enum:
                    - user
                    - admin
                    - regional
                    - notification_only
                    - user_manager
                    - read_only
                  community_ids:
                    description: 'Communities this user has access to. Not needed
                      for `admin` role users

                      '
                    type: array
                    items:
                      type: integer
                  all_communities:
                    description: |
                      Set to `true` if user should have access to all communities (including
                      new communities added in the future). There is no need to set individual
                      `community_ids` when using this option.

                      If setting individual `community_ids` and `all_communities` is not
                      provided, it will automatically be set to `false`.

                      If setting `community_ids` to an empty array and `all_communities` is
                      not provided, it will automatically be set to `true`. To make a user
                      with access to no communities, be sure to set `{ "community_ids": [],
                      "all_communities": false }`.
                    type: boolean
                  created_at:
                    type: string
                    format: date-time
                  deactivated_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
    put:
      summary: Update User
      description: Requires an API Token with access to all communities
      tags:
      - Users
      parameters: []
      responses:
        '200':
          description: user
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  email:
                    type: string
                  first_name:
                    type: string
                  last_name:
                    type: string
                  role:
                    type: string
                    enum:
                    - user
                    - admin
                    - regional
                    - notification_only
                    - user_manager
                    - read_only
                  community_ids:
                    description: 'Communities this user has access to. Not needed
                      for `admin` role users

                      '
                    type: array
                    items:
                      type: integer
                  all_communities:
                    description: |
                      Set to `true` if user should have access to all communities (including
                      new communities added in the future). There is no need to set individual
                      `community_ids` when using this option.

                      If setting individual `community_ids` and `all_communities` is not
                      provided, it will automatically be set to `false`.

                      If setting `community_ids` to an empty array and `all_communities` is
                      not provided, it will automatically be set to `true`. To make a user
                      with access to no communities, be sure to set `{ "community_ids": [],
                      "all_communities": false }`.
                    type: boolean
                  created_at:
                    type: string
                    format: date-time
                  deactivated_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '422':
          description: user
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      user.email:
                      - can't be blank
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  properties:
                    email:
                      type: string
                    first_name:
                      type: string
                    last_name:
                      type: string
                    role:
                      type: string
                      enum:
                      - user
                      - admin
                      - regional
                      - notification_only
                      - user_manager
                      - read_only
                    community_ids:
                      description: 'Communities this user has access to. Not needed
                        for `admin` role users

                        '
                      type: array
                      items:
                        type: integer
                    all_communities:
                      description: |
                        Set to `true` if user should have access to all communities (including
                        new communities added in the future). There is no need to set individual
                        `community_ids` when using this option.

                        If setting individual `community_ids` and `all_communities` is not
                        provided, it will automatically be set to `false`.

                        If setting `community_ids` to an empty array and `all_communities` is
                        not provided, it will automatically be set to `true`. To make a user
                        with access to no communities, be sure to set `{ "community_ids": [],
                        "all_communities": false }`.
                      type: boolean
                  required:
                  - email
  "/users/{id}/deactivate":
    put:
      summary: Deactivate User
      description: Requires an API Token with access to all communities
      tags:
      - Users
      responses:
        '200':
          description: user
  "/users/{id}/reactivate":
    put:
      summary: Reactivate User
      description: Requires an API Token with access to all communities
      tags:
      - Users
      responses:
        '200':
          description: user
components:
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      description: |+
        ## Authorization Request Header

        When making requests, include your API Token in an Authorization request header
        like so:

        ```
        Authorization: Token token={your_token_here}
        ```

        You can test your API token using the "/api/ping" endpoint. For example:

        ```
        curl https://crm.welcomehomesoftware.com/api/ping -H "Authorization: Token token={token_here}"
        ```

        A successful authentication returns with response code 200 and a JSON body
        describing the account the token provides access to. E.g.,

        ```
        {"account_id":2,"lead_source_id":null}
        ```

        A failed authentication returns with response code 401 and the message:

        ```
        {"error":"Bad credentials"}
        ```

        A failed authorization returns with response code 403 and the message:

        ```
        {"error":"Not authorized to perform this action"}
        ```

security:
- api_key: []
servers:
- url: https://crm.welcomehomesoftware.com/api
  description: Production Server
...
