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

# Create a leads qualification configuration



## OpenAPI

````yaml openapi-leads.json POST /v1/leads/qualification_configurations
openapi: 3.1.0
info:
  title: Yorlet Leads API
  description: APIs for managing enquiries and qualification configurations.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/leads/qualification_configurations:
    post:
      tags:
        - Leads Qualification Configurations
      summary: Create a leads qualification configuration
      operationId: leads_qualification_configurations_create
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  description: The name of the qualification configuration.
                active:
                  type: boolean
                  description: Whether the qualification configuration is active.
                after_completion:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - hosted_confirmation
                        - redirect
                      description: The specific action to take after completion.
                    hosted_confirmation:
                      type: object
                      properties:
                        custom_message:
                          type: string
                          description: Custom message to display after completion.
                      description: Configuration when type=hosted_confirmation.
                    redirect:
                      type: object
                      properties:
                        url:
                          type: string
                          format: uri
                          description: URL to redirect to after completion.
                      required:
                        - url
                      description: Configuration when type=redirect.
                  required:
                    - type
                  description: Configuration for after the qualification is submitted.
                custom_questions:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Unique identifier for the custom question.
                      label:
                        type: string
                        description: The label or text shown for the question.
                      type:
                        type: string
                        enum:
                          - text
                          - textarea
                          - select
                          - multiselect
                          - checkbox
                          - number
                        description: The input type used for the question.
                      required:
                        type: boolean
                        description: Whether an answer is required.
                      options:
                        type:
                          - array
                          - 'null'
                        items:
                          type: string
                        description: Options for select or multiselect questions.
                    required:
                      - id
                      - label
                      - type
                  description: Custom freeform questions to ask leads.
                default:
                  type: boolean
                  description: Whether this is the default qualification configuration.
                description:
                  type:
                    - string
                    - 'null'
                  description: An arbitrary description attached to the object.
                questions:
                  type: object
                  properties:
                    move_in_date:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Whether the move-in date question is asked.
                        required:
                          type: boolean
                          description: Whether the move-in date question is required.
                      required:
                        - enabled
                      description: Configuration for the move-in timeline question.
                    budget:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Whether the budget question is asked.
                        required:
                          type: boolean
                          description: Whether the budget question is required.
                        min_budget:
                          type:
                            - number
                            - 'null'
                          description: Minimum acceptable budget.
                        max_budget:
                          type:
                            - number
                            - 'null'
                          description: Maximum acceptable budget (used for filtering).
                      required:
                        - enabled
                      description: Configuration for the budget/affordability question.
                    household:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Whether the household composition question is asked.
                        required:
                          type: boolean
                          description: >-
                            Whether the household composition question is
                            required.
                        ask_occupants:
                          type: boolean
                          description: Whether to ask how many people will occupy the unit.
                        ask_children:
                          type: boolean
                          description: >-
                            Whether to ask if there will be children in the
                            household.
                        max_occupants:
                          type:
                            - number
                            - 'null'
                          description: The maximum number of occupants allowed.
                      required:
                        - enabled
                      description: Configuration for the household composition question.
                    pets:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Whether the pets question is asked.
                        required:
                          type: boolean
                          description: Whether the pets question is required.
                        allowed:
                          type: boolean
                          description: Whether pets are allowed.
                        allowed_types:
                          type:
                            - array
                            - 'null'
                          items:
                            type: string
                            enum:
                              - dog
                              - cat
                              - small_animal
                              - bird
                              - fish
                              - other
                          description: The pet types allowed at the property.
                        max_pets:
                          type:
                            - number
                            - 'null'
                          description: The maximum number of pets allowed.
                      required:
                        - enabled
                      description: Configuration for the pets question.
                    employment:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Whether the employment question is asked.
                        required:
                          type: boolean
                          description: Whether the employment question is required.
                        ask_employer:
                          type: boolean
                          description: Whether to ask for the lead's employer name.
                        ask_income:
                          type: boolean
                          description: Whether to ask for the lead's income range.
                        accepted_statuses:
                          type:
                            - array
                            - 'null'
                          items:
                            type: string
                            enum:
                              - employed
                              - self_employed
                              - student
                              - retired
                              - benefits
                              - other
                          description: The employment statuses that are accepted.
                      required:
                        - enabled
                      description: Configuration for the employment/income status question.
                    smoking:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Whether the smoking question is asked.
                        required:
                          type: boolean
                          description: Whether the smoking question is required.
                        non_smokers_only:
                          type: boolean
                          description: Whether only non-smokers are accepted.
                      required:
                        - enabled
                      description: Configuration for the smoking preference question.
                    current_situation:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: >-
                            Whether the current living situation question is
                            asked.
                        required:
                          type: boolean
                          description: >-
                            Whether the current living situation question is
                            required.
                        ask_reason_for_moving:
                          type: boolean
                          description: Whether to ask for the reason for moving.
                        ask_current_landlord:
                          type: boolean
                          description: >-
                            Whether to ask for the current landlord (used for
                            references).
                      required:
                        - enabled
                      description: Configuration for the current living situation question.
                    right_to_rent:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: Whether the right to rent question is asked.
                        required:
                          type: boolean
                          description: Whether the right to rent question is required.
                      required:
                        - enabled
                      description: Configuration for the right to rent question.
                    guarantor:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                          description: >-
                            Whether the guarantor availability question is
                            asked.
                        required:
                          type: boolean
                          description: >-
                            Whether the guarantor availability question is
                            required.
                      required:
                        - enabled
                      description: Configuration for the guarantor availability question.
                  description: Set of standard qualification questions to ask leads.
                metadata:
                  type:
                    - object
                    - 'null'
                  additionalProperties:
                    type: string
                  description: >-
                    Set of key-value pairs that you can attach to an object.
                    This can be useful for storing additional information about
                    the object in a structured format.
              required:
                - name
      responses:
        '200':
          description: Returns the customer object if the request succeeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  created:
                    type: number
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  account:
                    type: string
                    description: >-
                      The account that the object belongs to. Only returned if
                      the request is made with a valid Yorlet-Context header.
                  deleted:
                    type: boolean
                    default: false
                    description: Only returned if the object has been deleted.
                  object:
                    type: string
                    enum:
                      - leads.qualification_configuration
                  active:
                    type: boolean
                    description: Whether the qualification configuration is active.
                  after_completion:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - hosted_confirmation
                          - redirect
                        description: The specific action to take after completion.
                      hosted_confirmation:
                        type: object
                        properties:
                          custom_message:
                            type: string
                            description: Custom message to display after completion.
                        description: Configuration when type=hosted_confirmation.
                      redirect:
                        type: object
                        properties:
                          url:
                            type: string
                            format: uri
                            description: URL to redirect to after completion.
                        required:
                          - url
                        description: Configuration when type=redirect.
                    required:
                      - type
                    description: Configuration for after the qualification is completed.
                  default:
                    type: boolean
                    description: Whether this is the default qualification configuration.
                  description:
                    type:
                      - string
                      - 'null'
                    description: An arbitrary description attached to the object.
                  hosted_qualification_url:
                    type:
                      - string
                      - 'null'
                    format: uri
                    description: The URL for the hosted qualification form.
                  name:
                    type: string
                    description: The name of the qualification configuration.
                  questions:
                    type: object
                    properties:
                      move_in_date:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether the move-in date question is asked.
                          required:
                            type: boolean
                            default: false
                            description: Whether the move-in date question is required.
                        description: Configuration for the move-in timeline question.
                      budget:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether the budget question is asked.
                          required:
                            type: boolean
                            default: false
                            description: Whether the budget question is required.
                          min_budget:
                            type:
                              - number
                              - 'null'
                            default: null
                            description: Minimum acceptable budget.
                          max_budget:
                            type:
                              - number
                              - 'null'
                            default: null
                            description: Maximum acceptable budget (used for filtering).
                        description: Configuration for the budget/affordability question.
                      household:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: >-
                              Whether the household composition question is
                              asked.
                          required:
                            type: boolean
                            default: false
                            description: >-
                              Whether the household composition question is
                              required.
                          ask_occupants:
                            type: boolean
                            default: true
                            description: >-
                              Whether to ask how many people will occupy the
                              unit.
                          ask_children:
                            type: boolean
                            default: false
                            description: >-
                              Whether to ask if there will be children in the
                              household.
                          max_occupants:
                            type:
                              - number
                              - 'null'
                            default: null
                            description: The maximum number of occupants allowed.
                        description: Configuration for the household composition question.
                      pets:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether the pets question is asked.
                          required:
                            type: boolean
                            default: false
                            description: Whether the pets question is required.
                          allowed:
                            type: boolean
                            default: true
                            description: Whether pets are allowed.
                          allowed_types:
                            type:
                              - array
                              - 'null'
                            items:
                              type: string
                              enum:
                                - dog
                                - cat
                                - small_animal
                                - bird
                                - fish
                                - other
                            default: null
                            description: The pet types allowed at the property.
                          max_pets:
                            type:
                              - number
                              - 'null'
                            default: null
                            description: The maximum number of pets allowed.
                        description: Configuration for the pets question.
                      employment:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: true
                            description: Whether the employment question is asked.
                          required:
                            type: boolean
                            default: false
                            description: Whether the employment question is required.
                          ask_employer:
                            type: boolean
                            default: false
                            description: Whether to ask for the lead's employer name.
                          ask_income:
                            type: boolean
                            default: false
                            description: Whether to ask for the lead's income range.
                          accepted_statuses:
                            type:
                              - array
                              - 'null'
                            items:
                              type: string
                              enum:
                                - employed
                                - self_employed
                                - student
                                - retired
                                - benefits
                                - other
                            default:
                              - employed
                              - self_employed
                              - student
                              - retired
                              - benefits
                              - other
                            description: The employment statuses that are accepted.
                        description: >-
                          Configuration for the employment/income status
                          question.
                      smoking:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: false
                            description: Whether the smoking question is asked.
                          required:
                            type: boolean
                            default: false
                            description: Whether the smoking question is required.
                          non_smokers_only:
                            type: boolean
                            default: false
                            description: Whether only non-smokers are accepted.
                        description: Configuration for the smoking preference question.
                      current_situation:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: false
                            description: >-
                              Whether the current living situation question is
                              asked.
                          required:
                            type: boolean
                            default: false
                            description: >-
                              Whether the current living situation question is
                              required.
                          ask_reason_for_moving:
                            type: boolean
                            default: false
                            description: Whether to ask for the reason for moving.
                          ask_current_landlord:
                            type: boolean
                            default: false
                            description: >-
                              Whether to ask for the current landlord (used for
                              references).
                        description: >-
                          Configuration for the current living situation
                          question.
                      right_to_rent:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: false
                            description: Whether the right to rent question is asked.
                          required:
                            type: boolean
                            default: false
                            description: Whether the right to rent question is required.
                        description: Configuration for the right to rent question.
                      guarantor:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                            default: false
                            description: >-
                              Whether the guarantor availability question is
                              asked.
                          required:
                            type: boolean
                            default: false
                            description: >-
                              Whether the guarantor availability question is
                              required.
                        description: Configuration for the guarantor availability question.
                    required:
                      - move_in_date
                      - budget
                      - household
                      - pets
                      - employment
                      - smoking
                      - current_situation
                      - right_to_rent
                      - guarantor
                    description: Set of standard qualification questions to ask leads.
                  custom_questions:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the custom question.
                        label:
                          type: string
                          description: The label or text shown for the question.
                        type:
                          type: string
                          enum:
                            - text
                            - textarea
                            - select
                            - multiselect
                            - checkbox
                            - number
                          description: The input type used for the question.
                        required:
                          type: boolean
                          default: false
                          description: Whether an answer is required.
                        options:
                          type:
                            - array
                            - 'null'
                          items:
                            type: string
                          description: Options for select or multiselect questions.
                      required:
                        - id
                        - label
                        - type
                        - options
                    description: Custom freeform questions to ask leads.
                  metadata:
                    type:
                      - object
                      - 'null'
                    additionalProperties:
                      type: string
                    description: >-
                      Set of key-value pairs that you can attach to an object.
                      This can be useful for storing additional information
                      about the object in a structured format.
                required:
                  - id
                  - created
                  - object
                  - active
                  - after_completion
                  - default
                  - description
                  - hosted_qualification_url
                  - name
                  - questions
                  - custom_questions
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````