POST
/
meta
/
create_leadform
Create Leadform
curl --request POST \
  --url https://public.plai.io/meta/create_leadform \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "userId": "<string>",
  "leadFormQuestions": [
    {
      "type": "<string>",
      "label": "<string>",
      "options": [
        {
          "value": "<string>",
          "key": "<string>"
        }
      ]
    }
  ],
  "privacyPolicyUrl": "<string>",
  "privacyPolicyName": "<string>",
  "questionPageCustomHeadline": "<string>",
  "leadsFormName": "<string>",
  "thankYouPage": {
    "title": "<string>",
    "body": "<string>",
    "button_text": "<string>",
    "button_type": "<string>",
    "website_url": "<string>",
    "country_code": "<string>",
    "business_phone_number": "<string>"
  },
  "language": "<string>",
  "form_type": "<string>",
  "intro": {
    "title": "<string>",
    "style": "<string>",
    "content": [
      "<string>"
    ]
  }
}'
{
  "success": true,
  "results": {
    "success": true,
    "leadFormId": "<string>",
    "error": "<string>"
  }
}

Request Body

userId
string
required
User ID, If not already created, make a user on create user page first. If already created, retrieve the user ID from get profile page.
leadFormQuestions
object[]
required
privacyPolicyUrl
string
required
URL for the privacy policy
privacyPolicyName
string
required
Display name for the privacy policy link
questionPageCustomHeadline
string
Custom headline text for the question page
leadsFormName
string
required
Name for the leads form
thankYouPage
object
required
language
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
form_type
string
required
Type of form: MORE_VOLUME or HIGHER_INTENT
intro
object

Response

success
boolean
Indicates that the HTTP response was successful (status code 200 OK).
results
object