Skip to content

Public lead form ​

Public lead capture forms

INFO

Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.

POST /public-lead-form/create ​

Create a new public lead capture form with custom fields, styling, and page settings.

Тело запроса

ПолеТипОбязательноОписание
namestringДаDisplay name of the lead form
organization_idstringДаOrganization ObjectId the form belongs to
responsible_idstringДаResponsible user ObjectId
fieldsobject[]ДаOrdered list of form elements (header, paragraph, line, logo, file, field)
fields[].typestringДаElement type. Допустимые значения: header, paragraph, line, logo, file, field
fields[].ordernumberДаDisplay order index
fields[].namestringНетDisplay name for the element
fields[].placeholderstringНет
fields[].validation_typestringНетInput validation rule (field elements only). Допустимые значения: phone, email
fields[].is_requiredbooleanНет
fields[].colorstringНет
fields[].boldbooleanНет
fields[].italicbooleanНет
fields[].underlinebooleanНет
fields[].text_alignstringНетДопустимые значения: left, right, center
fields[].sizenumberНет
fields[].error_messagestringНет
fields[].custom_field_idstringНетCustom field ObjectId (field elements only)
pageobjectДа
page.background_colorstringДаPage background color (hex)
page.background_imagestringНетPage background image URL (when background_type is image)
page.background_typestringДаДопустимые значения: color, image
page.descriptionstringНет
page.header_activebooleanДа
page.header_typestringДаДопустимые значения: text, image
page.header_textstringДа
page.header_text_colorstringДа
page.header_imagestringНет
page.header_text_font_sizenumberДа
page.margin_leftnumberДа
page.margin_rightnumberДа
page.margin_topnumberДа
page.positionstringДаДопустимые значения: left, right, center
settingsobjectДа
settings.state_idstringНетDefault state ObjectId for submitted leads
settings.autocompletebooleanДаAuto-complete submitted leads
settings.success_messagestringНет
settings.has_redirectbooleanНет
settings.redirect_urlstringНет
settings.redirect_delaynumberНетRedirect delay in milliseconds
settings.submitstringНетSubmit button label
settings.sidebarobjectНет
settings.sidebar.fieldsobjectНетMap of sidebar field key to sidebar element
settings.sidebar.widthnumberДа
settings.sidebar.stylesobjectДа
settings.sidebar.typestringДаДопустимые значения: left, right
stylesobjectДа
styles.field_marginnumberДа
styles.marginbooleanДа
styles.field_backgroundstringДа
styles.field_border_colorstringДа
styles.field_formstringДаДопустимые значения: rounded, square, line
styles.field_heightnumberДа
styles.submit_backgroundstringДа
styles.submit_boldbooleanДа
styles.submit_italicbooleanДа
styles.submit_underlinebooleanДа
styles.submit_border_radiusstringДаДопустимые значения: square, rounded
styles.submit_colorstringДа
styles.submit_positionstringДаДопустимые значения: left, right, center
styles.submit_widthstringДаДопустимые значения: full_width, own
styles.widthnumberДа
styles.heightnumberДа
styles.form_border_colorstringДа
styles.form_border_radiusnumberДа
styles.fontstringДа
styles.font_colorstringДа
styles.font_sizenumberДа
styles.form_paddingsbooleanДа
styles.form_shadowbooleanДа
styles.backgroundstringДа
styles.background_typestringДаДопустимые значения: color, image
styles.name_positionstringДаДопустимые значения: left, top
cssstringНетOptional custom CSS overrides
json
{
  "name": "string",
  "organization_id": "string",
  "responsible_id": "string",
  "fields": [
    {
      "type": "header",
      "order": 0,
      "name": "string",
      "placeholder": "string",
      "validation_type": "phone",
      "is_required": false,
      "color": "string",
      "bold": false,
      "italic": false,
      "underline": false,
      "text_align": "left",
      "size": 0,
      "error_message": "string",
      "custom_field_id": "string"
    }
  ],
  "page": {
    "background_color": "string",
    "background_image": "string",
    "background_type": "color",
    "description": "string",
    "header_active": false,
    "header_type": "text",
    "header_text": "string",
    "header_text_color": "string",
    "header_image": "string",
    "header_text_font_size": 0,
    "margin_left": 0,
    "margin_right": 0,
    "margin_top": 0,
    "position": "left"
  },
  "settings": {
    "state_id": "string",
    "autocomplete": false,
    "success_message": "string",
    "has_redirect": false,
    "redirect_url": "string",
    "redirect_delay": 0,
    "submit": "string",
    "sidebar": {
      "fields": {},
      "width": 0,
      "styles": {
        "background_color": null,
        "background_image": null
      },
      "type": "left"
    }
  },
  "styles": {
    "field_margin": 0,
    "margin": false,
    "field_background": "string",
    "field_border_color": "string",
    "field_form": "rounded",
    "field_height": 0,
    "submit_background": "string",
    "submit_bold": false,
    "submit_italic": false,
    "submit_underline": false,
    "submit_border_radius": "square",
    "submit_color": "string",
    "submit_position": "left",
    "submit_width": "full_width",
    "width": 0,
    "height": 0,
    "form_border_color": "string",
    "form_border_radius": 0,
    "font": "string",
    "font_color": "string",
    "font_size": 0,
    "form_paddings": false,
    "form_shadow": false,
    "background": "string",
    "background_type": "color",
    "name_position": "left"
  },
  "css": "string"
}

Ответ

ПолеТипОписание
namestringDisplay name of the lead form
organization_idstringOrganization ObjectId the form belongs to
responsible_idstringResponsible user ObjectId
fieldsobject[]Ordered list of form elements (header, paragraph, line, logo, file, field)
fields[].typestringElement type. Допустимые значения: header, paragraph, line, logo, file, field
fields[].ordernumberDisplay order index
fields[].namestringDisplay name for the element
fields[].placeholderstring
fields[].validation_typestringInput validation rule (field elements only). Допустимые значения: phone, email
fields[].is_requiredboolean
fields[].colorstring
fields[].boldboolean
fields[].italicboolean
fields[].underlineboolean
fields[].text_alignstringДопустимые значения: left, right, center
fields[].sizenumber
fields[].error_messagestring
fields[].custom_field_idstringCustom field ObjectId (field elements only)
pageobject
page.background_colorstringPage background color (hex)
page.background_imagestringPage background image URL (when background_type is image)
page.background_typestringДопустимые значения: color, image
page.descriptionstring
page.header_activeboolean
page.header_typestringДопустимые значения: text, image
page.header_textstring
page.header_text_colorstring
page.header_imagestring
page.header_text_font_sizenumber
page.margin_leftnumber
page.margin_rightnumber
page.margin_topnumber
page.positionstringДопустимые значения: left, right, center
settingsobject
settings.state_idstringDefault state ObjectId for submitted leads
settings.autocompletebooleanAuto-complete submitted leads
settings.success_messagestring
settings.has_redirectboolean
settings.redirect_urlstring
settings.redirect_delaynumberRedirect delay in milliseconds
settings.submitstringSubmit button label
settings.sidebarobject
settings.sidebar.fieldsobjectMap of sidebar field key to sidebar element
settings.sidebar.widthnumber
settings.sidebar.stylesobject
settings.sidebar.typestringДопустимые значения: left, right
stylesobject
styles.field_marginnumber
styles.marginboolean
styles.field_backgroundstring
styles.field_border_colorstring
styles.field_formstringДопустимые значения: rounded, square, line
styles.field_heightnumber
styles.submit_backgroundstring
styles.submit_boldboolean
styles.submit_italicboolean
styles.submit_underlineboolean
styles.submit_border_radiusstringДопустимые значения: square, rounded
styles.submit_colorstring
styles.submit_positionstringДопустимые значения: left, right, center
styles.submit_widthstringДопустимые значения: full_width, own
styles.widthnumber
styles.heightnumber
styles.form_border_colorstring
styles.form_border_radiusnumber
styles.fontstring
styles.font_colorstring
styles.font_sizenumber
styles.form_paddingsboolean
styles.form_shadowboolean
styles.backgroundstring
styles.background_typestringДопустимые значения: color, image
styles.name_positionstringДопустимые значения: left, top
cssstringOptional custom CSS overrides
_idstringPublic lead form ObjectId
is_deletedbooleanSoft-delete flag
created_atstring (date-time)Creation timestamp (ISO 8601)
updated_atstring (date-time)Last update timestamp (ISO 8601)
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "name": "string",
    "organization_id": "string",
    "responsible_id": "string",
    "fields": [
      {
        "type": "header",
        "order": 0,
        "name": "string",
        "placeholder": "string",
        "validation_type": "phone",
        "is_required": false,
        "color": "string",
        "bold": false,
        "italic": false,
        "underline": false,
        "text_align": "left",
        "size": 0,
        "error_message": "string",
        "custom_field_id": "string"
      }
    ],
    "page": {
      "background_color": "string",
      "background_image": "string",
      "background_type": "color",
      "description": "string",
      "header_active": false,
      "header_type": "text",
      "header_text": "string",
      "header_text_color": "string",
      "header_image": "string",
      "header_text_font_size": 0,
      "margin_left": 0,
      "margin_right": 0,
      "margin_top": 0,
      "position": "left"
    },
    "settings": {
      "state_id": "string",
      "autocomplete": false,
      "success_message": "string",
      "has_redirect": false,
      "redirect_url": "string",
      "redirect_delay": 0,
      "submit": "string",
      "sidebar": {
        "fields": {},
        "width": 0,
        "styles": {
          "background_color": null,
          "background_image": null
        },
        "type": "left"
      }
    },
    "styles": {
      "field_margin": 0,
      "margin": false,
      "field_background": "string",
      "field_border_color": "string",
      "field_form": "rounded",
      "field_height": 0,
      "submit_background": "string",
      "submit_bold": false,
      "submit_italic": false,
      "submit_underline": false,
      "submit_border_radius": "square",
      "submit_color": "string",
      "submit_position": "left",
      "submit_width": "full_width",
      "width": 0,
      "height": 0,
      "form_border_color": "string",
      "form_border_radius": 0,
      "font": "string",
      "font_color": "string",
      "font_size": 0,
      "form_paddings": false,
      "form_shadow": false,
      "background": "string",
      "background_type": "color",
      "name_position": "left"
    },
    "css": "string",
    "_id": "string",
    "is_deleted": false,
    "created_at": "2025-05-01T12:00:00Z",
    "updated_at": "2025-05-01T12:00:00Z"
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /public-lead-form/update/{id} ​

Update an existing public lead form by its ObjectId.

Параметры пути

ПараметрТипОбязательноОписание
idstringДаLead form ObjectId

Тело запроса

ПолеТипОбязательноОписание
namestringДаDisplay name of the lead form
organization_idstringДаOrganization ObjectId the form belongs to
responsible_idstringДаResponsible user ObjectId
fieldsobject[]ДаOrdered list of form elements (header, paragraph, line, logo, file, field)
fields[].typestringДаElement type. Допустимые значения: header, paragraph, line, logo, file, field
fields[].ordernumberДаDisplay order index
fields[].namestringНетDisplay name for the element
fields[].placeholderstringНет
fields[].validation_typestringНетInput validation rule (field elements only). Допустимые значения: phone, email
fields[].is_requiredbooleanНет
fields[].colorstringНет
fields[].boldbooleanНет
fields[].italicbooleanНет
fields[].underlinebooleanНет
fields[].text_alignstringНетДопустимые значения: left, right, center
fields[].sizenumberНет
fields[].error_messagestringНет
fields[].custom_field_idstringНетCustom field ObjectId (field elements only)
pageobjectДа
page.background_colorstringДаPage background color (hex)
page.background_imagestringНетPage background image URL (when background_type is image)
page.background_typestringДаДопустимые значения: color, image
page.descriptionstringНет
page.header_activebooleanДа
page.header_typestringДаДопустимые значения: text, image
page.header_textstringДа
page.header_text_colorstringДа
page.header_imagestringНет
page.header_text_font_sizenumberДа
page.margin_leftnumberДа
page.margin_rightnumberДа
page.margin_topnumberДа
page.positionstringДаДопустимые значения: left, right, center
settingsobjectДа
settings.state_idstringНетDefault state ObjectId for submitted leads
settings.autocompletebooleanДаAuto-complete submitted leads
settings.success_messagestringНет
settings.has_redirectbooleanНет
settings.redirect_urlstringНет
settings.redirect_delaynumberНетRedirect delay in milliseconds
settings.submitstringНетSubmit button label
settings.sidebarobjectНет
settings.sidebar.fieldsobjectНетMap of sidebar field key to sidebar element
settings.sidebar.widthnumberДа
settings.sidebar.stylesobjectДа
settings.sidebar.typestringДаДопустимые значения: left, right
stylesobjectДа
styles.field_marginnumberДа
styles.marginbooleanДа
styles.field_backgroundstringДа
styles.field_border_colorstringДа
styles.field_formstringДаДопустимые значения: rounded, square, line
styles.field_heightnumberДа
styles.submit_backgroundstringДа
styles.submit_boldbooleanДа
styles.submit_italicbooleanДа
styles.submit_underlinebooleanДа
styles.submit_border_radiusstringДаДопустимые значения: square, rounded
styles.submit_colorstringДа
styles.submit_positionstringДаДопустимые значения: left, right, center
styles.submit_widthstringДаДопустимые значения: full_width, own
styles.widthnumberДа
styles.heightnumberДа
styles.form_border_colorstringДа
styles.form_border_radiusnumberДа
styles.fontstringДа
styles.font_colorstringДа
styles.font_sizenumberДа
styles.form_paddingsbooleanДа
styles.form_shadowbooleanДа
styles.backgroundstringДа
styles.background_typestringДаДопустимые значения: color, image
styles.name_positionstringДаДопустимые значения: left, top
cssstringНетOptional custom CSS overrides
_idstringДаLead form ObjectId to update
json
{
  "name": "string",
  "organization_id": "string",
  "responsible_id": "string",
  "fields": [
    {
      "type": "header",
      "order": 0,
      "name": "string",
      "placeholder": "string",
      "validation_type": "phone",
      "is_required": false,
      "color": "string",
      "bold": false,
      "italic": false,
      "underline": false,
      "text_align": "left",
      "size": 0,
      "error_message": "string",
      "custom_field_id": "string"
    }
  ],
  "page": {
    "background_color": "string",
    "background_image": "string",
    "background_type": "color",
    "description": "string",
    "header_active": false,
    "header_type": "text",
    "header_text": "string",
    "header_text_color": "string",
    "header_image": "string",
    "header_text_font_size": 0,
    "margin_left": 0,
    "margin_right": 0,
    "margin_top": 0,
    "position": "left"
  },
  "settings": {
    "state_id": "string",
    "autocomplete": false,
    "success_message": "string",
    "has_redirect": false,
    "redirect_url": "string",
    "redirect_delay": 0,
    "submit": "string",
    "sidebar": {
      "fields": {},
      "width": 0,
      "styles": {
        "background_color": null,
        "background_image": null
      },
      "type": "left"
    }
  },
  "styles": {
    "field_margin": 0,
    "margin": false,
    "field_background": "string",
    "field_border_color": "string",
    "field_form": "rounded",
    "field_height": 0,
    "submit_background": "string",
    "submit_bold": false,
    "submit_italic": false,
    "submit_underline": false,
    "submit_border_radius": "square",
    "submit_color": "string",
    "submit_position": "left",
    "submit_width": "full_width",
    "width": 0,
    "height": 0,
    "form_border_color": "string",
    "form_border_radius": 0,
    "font": "string",
    "font_color": "string",
    "font_size": 0,
    "form_paddings": false,
    "form_shadow": false,
    "background": "string",
    "background_type": "color",
    "name_position": "left"
  },
  "css": "string",
  "_id": "string"
}

Ответ

Структура ответа совпадает с POST /public-lead-form/create.

GET /public-lead-form/get-by-id/{id} ​

Fetch a single public lead form by its ObjectId.

Параметры пути

ПараметрТипОбязательноОписание
idstringДаLead form ObjectId

Тело запроса

Тело запроса не требуется.

Ответ

Структура ответа совпадает с POST /public-lead-form/create.

POST /public-lead-form/get-paging ​

Paginated list of public lead forms, optionally filtered by organization.

Тело запроса

ПолеТипОбязательноОписание
pagenumberДаПо умолчанию: 1
limitnumberДаПо умолчанию: 20
organization_idstringНетFilter by organization ObjectId
json
{
  "page": 1,
  "limit": 20,
  "organization_id": "string"
}

Ответ

ПолеТипОписание
totalnumber
listobject[]
list[].namestringDisplay name of the lead form
list[].organization_idstringOrganization ObjectId the form belongs to
list[].responsible_idstringResponsible user ObjectId
list[].fieldsobject[]Ordered list of form elements (header, paragraph, line, logo, file, field)
list[].fields[].typestringElement type. Допустимые значения: header, paragraph, line, logo, file, field
list[].fields[].ordernumberDisplay order index
list[].fields[].namestringDisplay name for the element
list[].fields[].placeholderstring
list[].fields[].validation_typestringInput validation rule (field elements only). Допустимые значения: phone, email
list[].fields[].is_requiredboolean
list[].fields[].colorstring
list[].fields[].boldboolean
list[].fields[].italicboolean
list[].fields[].underlineboolean
list[].fields[].text_alignstringДопустимые значения: left, right, center
list[].fields[].sizenumber
list[].fields[].error_messagestring
list[].fields[].custom_field_idstringCustom field ObjectId (field elements only)
list[].pageobject
list[].page.background_colorstringPage background color (hex)
list[].page.background_imagestringPage background image URL (when background_type is image)
list[].page.background_typestringДопустимые значения: color, image
list[].page.descriptionstring
list[].page.header_activeboolean
list[].page.header_typestringДопустимые значения: text, image
list[].page.header_textstring
list[].page.header_text_colorstring
list[].page.header_imagestring
list[].page.header_text_font_sizenumber
list[].page.margin_leftnumber
list[].page.margin_rightnumber
list[].page.margin_topnumber
list[].page.positionstringДопустимые значения: left, right, center
list[].settingsobject
list[].settings.state_idstringDefault state ObjectId for submitted leads
list[].settings.autocompletebooleanAuto-complete submitted leads
list[].settings.success_messagestring
list[].settings.has_redirectboolean
list[].settings.redirect_urlstring
list[].settings.redirect_delaynumberRedirect delay in milliseconds
list[].settings.submitstringSubmit button label
list[].settings.sidebarobject
list[].stylesobject
list[].styles.field_marginnumber
list[].styles.marginboolean
list[].styles.field_backgroundstring
list[].styles.field_border_colorstring
list[].styles.field_formstringДопустимые значения: rounded, square, line
list[].styles.field_heightnumber
list[].styles.submit_backgroundstring
list[].styles.submit_boldboolean
list[].styles.submit_italicboolean
list[].styles.submit_underlineboolean
list[].styles.submit_border_radiusstringДопустимые значения: square, rounded
list[].styles.submit_colorstring
list[].styles.submit_positionstringДопустимые значения: left, right, center
list[].styles.submit_widthstringДопустимые значения: full_width, own
list[].styles.widthnumber
list[].styles.heightnumber
list[].styles.form_border_colorstring
list[].styles.form_border_radiusnumber
list[].styles.fontstring
list[].styles.font_colorstring
list[].styles.font_sizenumber
list[].styles.form_paddingsboolean
list[].styles.form_shadowboolean
list[].styles.backgroundstring
list[].styles.background_typestringДопустимые значения: color, image
list[].styles.name_positionstringДопустимые значения: left, top
list[].cssstringOptional custom CSS overrides
list[]._idstringPublic lead form ObjectId
list[].is_deletedbooleanSoft-delete flag
list[].created_atstring (date-time)Creation timestamp (ISO 8601)
list[].updated_atstring (date-time)Last update timestamp (ISO 8601)
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "total": 0,
    "list": [
      {
        "name": "string",
        "organization_id": "string",
        "responsible_id": "string",
        "fields": [],
        "page": {
          "background_color": null,
          "background_image": null,
          "background_type": null,
          "description": null,
          "header_active": null,
          "header_type": null,
          "header_text": null,
          "header_text_color": null,
          "header_image": null,
          "header_text_font_size": null,
          "margin_left": null,
          "margin_right": null,
          "margin_top": null,
          "position": null
        },
        "settings": {
          "state_id": null,
          "autocomplete": null,
          "success_message": null,
          "has_redirect": null,
          "redirect_url": null,
          "redirect_delay": null,
          "submit": null,
          "sidebar": null
        },
        "styles": {
          "field_margin": null,
          "margin": null,
          "field_background": null,
          "field_border_color": null,
          "field_form": null,
          "field_height": null,
          "submit_background": null,
          "submit_bold": null,
          "submit_italic": null,
          "submit_underline": null,
          "submit_border_radius": null,
          "submit_color": null,
          "submit_position": null,
          "submit_width": null,
          "width": null,
          "height": null,
          "form_border_color": null,
          "form_border_radius": null,
          "font": null,
          "font_color": null,
          "font_size": null,
          "form_paddings": null,
          "form_shadow": null,
          "background": null,
          "background_type": null,
          "name_position": null
        },
        "css": "string",
        "_id": "string",
        "is_deleted": false,
        "created_at": "2025-05-01T12:00:00Z",
        "updated_at": "2025-05-01T12:00:00Z"
      }
    ]
  },
  "time": "2025-05-01T12:00:00Z"
}

DELETE /public-lead-form/delete/{id} ​

Soft-delete a public lead form by its ObjectId.

Параметры пути

ПараметрТипОбязательноОписание
idstringДаLead form ObjectId to delete

Тело запроса

Тело запроса не требуется.

Ответ

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": "ok",
  "time": "2025-05-01T12:00:00Z"
}

Эта страница сгенерирована из спецификации OpenAPI.

Bito 2.0 Integration API