> ## Documentation Index
> Fetch the complete documentation index at: https://plai-a079b342.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Leadform

> This endpoint is used to create a leadform.

## Request Body

<ParamField body="userId" type="string" required>
  User ID, If not already created, make a user on [create user
  page](/api-reference/endpoint/auth/create_user) first. If already created,
  retrieve the user ID from [get profile
  page](/api-reference/endpoint/auth/get_profile).
</ParamField>

<ParamField body="leadFormQuestions" type="object[]" required>
  <Expandable title="Lead Form Questions Array">
    <ParamField body="type" type="string" required>
      Type of question `CUSTOM`, `CITY`, `COMPANY_NAME`, `COUNTRY`, `DOB`, `EMAIL`, `GENDER`, `FIRST_NAME`, `FULL_NAME`, `JOB_TITLE`, `LAST_NAME`, `MARITIAL_STATUS`, `WHATSAPP_NUMBER`, `EDUCATION_LEVEL`, `WEBSITE`, `PHONE`, `PHONE_OTP`, `POST_CODE`, `PROVINCE`, `RELATIONSHIP_STATUS`, `STATE`, `STREET_ADDRESS`, `ZIP`, `WORK_EMAIL`, `MILITARY_STATUS`, `WORK_PHONE_NUMBER`, `SLIDER`, `STORE_LOOKUP`, `STORE_LOOKUP_WITH_TYPEAHEAD`, `DATE_TIME`, `ID_CPF`, `ID_AR_DNI`, `ID_CL_RUT`, `ID_CO_CC`, `ID_EC_CI`, `ID_PE_DNI`, `ID_MX_RFC`, `JOIN_CODE`, `USER_PROVIDED_PHONE_NUMBER`, `FACEBOOK_LEAD_ID`, `EMAIL_ALIAS`, `MESSENGER`, `VIN`, `LICENSE_PLATE`
    </ParamField>

    <ParamField body="label" type="string">
      Custom label for CUSTOM type questions
    </ParamField>

    <ParamField body="options" type="object[]">
      <Expandable title="Options Array">
        <ParamField body="value" type="string" required>
          Display value of the option
        </ParamField>

        <ParamField body="key" type="string" required>
          Internal key for the option
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="privacyPolicyUrl" type="string" required>
  URL for the privacy policy
</ParamField>

<ParamField body="privacyPolicyName" type="string" required>
  Display name for the privacy policy link
</ParamField>

<ParamField body="questionPageCustomHeadline" type="string">
  Custom headline text for the question page
</ParamField>

<ParamField body="leadsFormName" type="string" required>
  Name for the leads form
</ParamField>

<ParamField body="thankYouPage" type="object" required>
  <Expandable title="Thank You Page Object">
    <ParamField body="title" type="string" required>
      Title displayed on thank you page
    </ParamField>

    <ParamField body="body" type="string" required>
      Body text displayed on thank you page
    </ParamField>

    <ParamField body="button_text" type="string" required>
      Text for the action button
    </ParamField>

    <ParamField body="button_type" type="string" required>
      Type of button: `VIEW_WEBSITE`, `CALL_BUSINESS`
    </ParamField>

    <ParamField body="website_url" type="string">
      URL for the website button

      <Note>
        This field must be **required** when `button_type` is set to `VISIT_WEBSITE`.
      </Note>
    </ParamField>

    <ParamField body="country_code" type="string">
      ISO 3166-1 alpha-2 country codes e.g: `US`,`UK`

      <Note>
        This field must be **required** when `button_type` is set to `CALL_BUSINESS`.
      </Note>
    </ParamField>

    <ParamField body="business_phone_number" type="string">
      Business phone number to display

      <Note>
        This field must be **required** when `button_type` is set to `CALL_BUSINESS`.
      </Note>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="language" type="string" required>
  Language code for the form: `AR_AR`, `CS_CZ`, `DA_DK`, `DE_DE`, `EL_GR`,
  `EN_GB`, `EN_US`, `ES_ES`, `ES_LA`, `FI_FI`, `FR_FR`, `HE_IL`, `HI_IN`,
  `HU_HU`, `ID_ID`, `IT_IT`, `JA_JP`, `KO_KR`, `NB_NO`, `NL_NL`, `PL_PL`,
  `PT_BR`, `PT_PT`, `RO_RO`, `RU_RU`, `SV_SE`, `TH_TH`, `TR_TR`, `VI_VN`,
  `ZH_CN`, `ZH_HK`, `ZH_TW`
</ParamField>

<ParamField body="form_type" type="string" required>
  Type of form: `MORE_VOLUME` or `HIGHER_INTENT`
</ParamField>

<ParamField body="intro" type="object">
  <Expandable title="Intro Object">
    <ParamField body="title" type="string" required>
      Title for the introduction section
    </ParamField>

    <ParamField body="style" type="string" required>
      Styles: `LIST_STYLE`, `PARAGRAPH_STYLE`
    </ParamField>

    <ParamField body="content" type="string[]" required>
      List items or content for the introduction section
    </ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates that the HTTP response was successful (status code 200 OK).
</ResponseField>

<ResponseField name="results" type="object">
  <Expandable title="Results Object">
    <ResponseField name="success" type="boolean">
      Indicates whether the specific operation or API action was
      successful.
    </ResponseField>

    <ResponseField name="leadFormId" type="string">
      Unique identifier for the lead form
    </ResponseField>

    <ResponseField name="error" type="string">
      Error string if something went wrong
    </ResponseField>
  </Expandable>
</ResponseField>
