Skip to content

Public lead form ​

Public lead capture forms

INFO

Every response arrives in the shared envelope — code, message, messages, status_code, time — with the payload in data. The tables below describe what is inside data.

POST /public-lead-form/create ​

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

Request body

FieldTypeRequiredDescription
namestringYesDisplay name of the lead form
organization_idstringYesOrganization ObjectId the form belongs to
responsible_idstringYesResponsible user ObjectId
fieldsobject[]YesOrdered list of form elements (header, paragraph, line, logo, file, field)
fields[].typestringYesElement type. One of: header, paragraph, line, logo, file, field
fields[].ordernumberYesDisplay order index
fields[].namestringNoDisplay name for the element
fields[].placeholderstringNo
fields[].validation_typestringNoInput validation rule (field elements only). One of: phone, email
fields[].is_requiredbooleanNo
fields[].colorstringNo
fields[].boldbooleanNo
fields[].italicbooleanNo
fields[].underlinebooleanNo
fields[].text_alignstringNoOne of: left, right, center
fields[].sizenumberNo
fields[].error_messagestringNo
fields[].custom_field_idstringNoCustom field ObjectId (field elements only)
pageobjectYes
page.background_colorstringYesPage background color (hex)
page.background_imagestringNoPage background image URL (when background_type is image)
page.background_typestringYesOne of: color, image
page.descriptionstringNo
page.header_activebooleanYes
page.header_typestringYesOne of: text, image
page.header_textstringYes
page.header_text_colorstringYes
page.header_imagestringNo
page.header_text_font_sizenumberYes
page.margin_leftnumberYes
page.margin_rightnumberYes
page.margin_topnumberYes
page.positionstringYesOne of: left, right, center
settingsobjectYes
settings.state_idstringNoDefault state ObjectId for submitted leads
settings.autocompletebooleanYesAuto-complete submitted leads
settings.success_messagestringNo
settings.has_redirectbooleanNo
settings.redirect_urlstringNo
settings.redirect_delaynumberNoRedirect delay in milliseconds
settings.submitstringNoSubmit button label
settings.sidebarobjectNo
settings.sidebar.fieldsobjectNoMap of sidebar field key to sidebar element
settings.sidebar.widthnumberYes
settings.sidebar.stylesobjectYes
settings.sidebar.typestringYesOne of: left, right
stylesobjectYes
styles.field_marginnumberYes
styles.marginbooleanYes
styles.field_backgroundstringYes
styles.field_border_colorstringYes
styles.field_formstringYesOne of: rounded, square, line
styles.field_heightnumberYes
styles.submit_backgroundstringYes
styles.submit_boldbooleanYes
styles.submit_italicbooleanYes
styles.submit_underlinebooleanYes
styles.submit_border_radiusstringYesOne of: square, rounded
styles.submit_colorstringYes
styles.submit_positionstringYesOne of: left, right, center
styles.submit_widthstringYesOne of: full_width, own
styles.widthnumberYes
styles.heightnumberYes
styles.form_border_colorstringYes
styles.form_border_radiusnumberYes
styles.fontstringYes
styles.font_colorstringYes
styles.font_sizenumberYes
styles.form_paddingsbooleanYes
styles.form_shadowbooleanYes
styles.backgroundstringYes
styles.background_typestringYesOne of: color, image
styles.name_positionstringYesOne of: left, top
cssstringNoOptional 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"
}

Response

FieldTypeDescription
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. One of: 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). One of: phone, email
fields[].is_requiredboolean
fields[].colorstring
fields[].boldboolean
fields[].italicboolean
fields[].underlineboolean
fields[].text_alignstringOne of: 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_typestringOne of: color, image
page.descriptionstring
page.header_activeboolean
page.header_typestringOne of: 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.positionstringOne of: 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.typestringOne of: left, right
stylesobject
styles.field_marginnumber
styles.marginboolean
styles.field_backgroundstring
styles.field_border_colorstring
styles.field_formstringOne of: rounded, square, line
styles.field_heightnumber
styles.submit_backgroundstring
styles.submit_boldboolean
styles.submit_italicboolean
styles.submit_underlineboolean
styles.submit_border_radiusstringOne of: square, rounded
styles.submit_colorstring
styles.submit_positionstringOne of: left, right, center
styles.submit_widthstringOne of: 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_typestringOne of: color, image
styles.name_positionstringOne of: 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.

Path parameters

ParameterTypeRequiredDescription
idstringYesLead form ObjectId

Request body

FieldTypeRequiredDescription
namestringYesDisplay name of the lead form
organization_idstringYesOrganization ObjectId the form belongs to
responsible_idstringYesResponsible user ObjectId
fieldsobject[]YesOrdered list of form elements (header, paragraph, line, logo, file, field)
fields[].typestringYesElement type. One of: header, paragraph, line, logo, file, field
fields[].ordernumberYesDisplay order index
fields[].namestringNoDisplay name for the element
fields[].placeholderstringNo
fields[].validation_typestringNoInput validation rule (field elements only). One of: phone, email
fields[].is_requiredbooleanNo
fields[].colorstringNo
fields[].boldbooleanNo
fields[].italicbooleanNo
fields[].underlinebooleanNo
fields[].text_alignstringNoOne of: left, right, center
fields[].sizenumberNo
fields[].error_messagestringNo
fields[].custom_field_idstringNoCustom field ObjectId (field elements only)
pageobjectYes
page.background_colorstringYesPage background color (hex)
page.background_imagestringNoPage background image URL (when background_type is image)
page.background_typestringYesOne of: color, image
page.descriptionstringNo
page.header_activebooleanYes
page.header_typestringYesOne of: text, image
page.header_textstringYes
page.header_text_colorstringYes
page.header_imagestringNo
page.header_text_font_sizenumberYes
page.margin_leftnumberYes
page.margin_rightnumberYes
page.margin_topnumberYes
page.positionstringYesOne of: left, right, center
settingsobjectYes
settings.state_idstringNoDefault state ObjectId for submitted leads
settings.autocompletebooleanYesAuto-complete submitted leads
settings.success_messagestringNo
settings.has_redirectbooleanNo
settings.redirect_urlstringNo
settings.redirect_delaynumberNoRedirect delay in milliseconds
settings.submitstringNoSubmit button label
settings.sidebarobjectNo
settings.sidebar.fieldsobjectNoMap of sidebar field key to sidebar element
settings.sidebar.widthnumberYes
settings.sidebar.stylesobjectYes
settings.sidebar.typestringYesOne of: left, right
stylesobjectYes
styles.field_marginnumberYes
styles.marginbooleanYes
styles.field_backgroundstringYes
styles.field_border_colorstringYes
styles.field_formstringYesOne of: rounded, square, line
styles.field_heightnumberYes
styles.submit_backgroundstringYes
styles.submit_boldbooleanYes
styles.submit_italicbooleanYes
styles.submit_underlinebooleanYes
styles.submit_border_radiusstringYesOne of: square, rounded
styles.submit_colorstringYes
styles.submit_positionstringYesOne of: left, right, center
styles.submit_widthstringYesOne of: full_width, own
styles.widthnumberYes
styles.heightnumberYes
styles.form_border_colorstringYes
styles.form_border_radiusnumberYes
styles.fontstringYes
styles.font_colorstringYes
styles.font_sizenumberYes
styles.form_paddingsbooleanYes
styles.form_shadowbooleanYes
styles.backgroundstringYes
styles.background_typestringYesOne of: color, image
styles.name_positionstringYesOne of: left, top
cssstringNoOptional custom CSS overrides
_idstringYesLead 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"
}

Response

Same response shape as POST /public-lead-form/create.

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

Fetch a single public lead form by its ObjectId.

Path parameters

ParameterTypeRequiredDescription
idstringYesLead form ObjectId

Request body

No request body.

Response

Same response shape as POST /public-lead-form/create.

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

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

Request body

FieldTypeRequiredDescription
pagenumberYesDefault: 1
limitnumberYesDefault: 20
organization_idstringNoFilter by organization ObjectId
json
{
  "page": 1,
  "limit": 20,
  "organization_id": "string"
}

Response

FieldTypeDescription
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. One of: 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). One of: phone, email
list[].fields[].is_requiredboolean
list[].fields[].colorstring
list[].fields[].boldboolean
list[].fields[].italicboolean
list[].fields[].underlineboolean
list[].fields[].text_alignstringOne of: 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_typestringOne of: color, image
list[].page.descriptionstring
list[].page.header_activeboolean
list[].page.header_typestringOne of: 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.positionstringOne of: 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_formstringOne of: 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_radiusstringOne of: square, rounded
list[].styles.submit_colorstring
list[].styles.submit_positionstringOne of: left, right, center
list[].styles.submit_widthstringOne of: 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_typestringOne of: color, image
list[].styles.name_positionstringOne of: 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.

Path parameters

ParameterTypeRequiredDescription
idstringYesLead form ObjectId to delete

Request body

No request body.

Response

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

This page is generated from the OpenAPI spec.

Bito 2.0 Integration API