Edit a custom field

post/v1/customField/edit

This API allows users to modify the details of a custom field by providing the field ID and the updated field information, such as field name, field description, field order, and form field, ensuring flexibility in custom field management.

Code snippet

curl --location 'https://api.boldsign.com/v1/customField/edit?customFieldId={customFieldId}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json;odata.metadata=minimal;odata.streaming=true' \
--header 'Authorization: {{apiKey}}' \
--data '{
  "fieldName": "string",
  "fieldDescription": "string",
  "fieldOrder": 1,
  "brandId": "string",
  "sharedField": true,
  "formField": {
    "fieldType": "Signature",
    "font": "Courier",
    "width": 60,
    "height": 20,
    "isRequired": true,
    "isReadOnly": true,
    "value": "string",
    "fontSize": 13,
    "fontHexColor": "string",
    "isBoldFont": true,
    "isItalicFont": true,
    "isUnderLineFont": true,
    "lineHeight": 15,
    "characterLimit": 0,
    "placeHolder": "string",
    "validationType": "NumbersOnly",
    "validationCustomRegex": "string",
    "validationCustomRegexMessage": "string",
    "dateFormat": "string",
    "timeFormat": "string",
    "imageInfo": {
      "allowedFileExtensions": "string",
      "title": "string",
      "description": "string"
    },
    "attachmentInfo": {
      "allowedFileTypes": "string",
      "title": "string",
      "description": "string",
      "acceptedFileTypes": [
        "string",
        "string"
      ]
    },
    "editableDateFieldSettings": {
      "dateFormat": "string",
      "minDate": "2023-06-26T05:56:38.655Z",
      "maxDate": "2023-06-26T05:56:38.655Z"
    },
    "hyperlinkText": "string",
    "dataSyncTag": "string",
    "dropdownOptions": [
      "string",
      "string"
    ],
    "textAlign": "Center",
    "textDirection": "LTR",
    "characterSpacing": 0,
    "idPrefix": "string",
    "restrictIdPrefixChange": false,
    "backgroundHexColor": "string"
  }
}'
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"https://api.boldsign.com/v1/customField/edit?customFieldId={customFieldId}");
request.Headers.Add("Accept", "application/json;odata.metadata=minimal;odata.streaming=true");
request.Headers.Add("Authorization", "{{apiKey}}");

var content = new StringContent(@"{
    ""fieldName"": ""string"",
    ""fieldDescription"": ""string"",
    ""fieldOrder"": 1,
    ""brandId"": ""string"",
    ""sharedField"": true,
    ""formField"": {
        ""fieldType"": ""Signature"",
        ""font"": ""Courier"",
        ""width"": 60,
        ""height"": 20,
        ""isRequired"": true,
        ""isReadOnly"": true,
        ""value"": ""string"",
        ""fontSize"": 13,
        ""fontHexColor"": ""string"",
        ""isBoldFont"": true,
        ""isItalicFont"": true,
        ""isUnderLineFont"": true,
        ""lineHeight"": 15,
        ""characterLimit"": 0,
        ""placeHolder"": ""string"",
        ""validationType"": ""NumbersOnly"",
        ""validationCustomRegex"": ""string"",
        ""validationCustomRegexMessage"": ""string"",
        ""dateFormat"": ""string"",
        ""timeFormat"": ""string"",
        ""imageInfo"": {
            ""allowedFileExtensions"": ""string"",
            ""title"": ""string"",
            ""description"": ""string""
        },
        ""attachmentInfo"": {
            ""allowedFileTypes"": ""string"",
            ""title"": ""string"",
            ""description"": ""string"",
            ""acceptedFileTypes"": [
                ""string"",
                ""string""
            ]
        },
        ""editableDateFieldSettings"": {
            ""dateFormat"": ""string"",
            ""minDate"": ""2023-06-26T04:11:52.213Z"",
            ""maxDate"": ""2023-06-26T04:11:52.213Z""
        },
        ""hyperlinkText"": ""string"",
        ""dataSyncTag"": ""string"",
        ""dropdownOptions"": [
            ""string"",
            ""string""
        ],
        ""textAlign"": ""Center"",
        ""textDirection"": ""LTR"",
        ""characterSpacing"": 0,
        ""idPrefix"": ""string"",
        ""restrictIdPrefixChange"": false,
        ""backgroundHexColor"": ""string""
    }
}", Encoding.UTF8, "application/json");

request.Content = content;

var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
import boldsign

configuration = boldsign.Configuration(api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:
    
    custom_field_api = boldsign.CustomFieldApi(api_client)
    custom_form_fields = boldsign.CustomFormField(
        fieldType="Signature",
    )

    edit_custom_field_details_request = boldsign.BrandCustomFieldDetails(
        fieldName="string",
        brandId="YOUR_BRAND_ID",
        sharedField=True,
        formField=custom_form_fields
    )
    
    edit_custom_field_details_response = custom_field_api.edit_custom_field(custom_field_id="CUSTOM_FIELD_ID", brand_custom_field_details=edit_custom_field_details_request)
<?php require_once "vendor/autoload.php";

$config = new BoldSign\Configuration();
$config->setApiKey('YOUR_API_KEY');

$custom_field_api = new BoldSign\Api\CustomFieldApi($config);
$custom_form_field = new \BoldSign\Model\CustomFormField();
$custom_form_field->setFieldType('Signature');

$edit_custom_field_details = new \BoldSign\Model\BrandCustomFieldDetails();
$edit_custom_field_details->setFieldName('string');
$edit_custom_field_details->setBrandId('YOUR_BRAND_ID');
$edit_custom_field_details->setSharedField(true);
$edit_custom_field_details->setFormField($custom_form_field);

$edit_custom_field_details_response = $custom_field_api->editCustomField($custom_field_id='CUSTOM_FIELD_ID', $edit_custom_field_details);
ApiClient client = Configuration.getDefaultApiClient();  
client.setApiKey("YOUR_API_KEY");

CustomFieldApi customFieldApi = new CustomFieldApi();
CustomFormField customFormField = new CustomFormField();
customFormField.setFieldType(CustomFormField.FieldTypeEnum.SIGNATURE);
	
BrandCustomFieldDetails editBrandCustomFieldDetails = new BrandCustomFieldDetails();
editBrandCustomFieldDetails.setFieldName("string");
editBrandCustomFieldDetails.setBrandId("YOUR_BRAND_ID");   
editBrandCustomFieldDetails.setSharedField(true);   
editBrandCustomFieldDetails.setFormField(customFormField);             
        
CustomFieldMessage editCustomFieldResponse = customFieldApi.editCustomField("CUSTOM_FIELD_ID", editBrandCustomFieldDetails);
import { CustomFieldApi,BrandCustomFieldDetails, CustomFormField } from "boldsign";

const customFieldApi = new CustomFieldApi();
customFieldApi.setApiKey("YOUR_API_KEY");

const formField = new CustomFormField();
formField.fieldType = CustomFormField.FieldTypeEnum.Signature;
formField.placeHolder = "new_placeholder";

const customFieldDetails = new BrandCustomFieldDetails();
customFieldDetails.fieldName = "string";
customFieldDetails.brandId = "YOUR_BRAND_ID";
customFieldDetails.sharedField = true;
customFieldDetails.formField = formField;

const updateCustomFieldResponse = customFieldApi.editCustomField("YOUR_CUSTOMFIELD_ID", customFieldDetails);

Query parameters

customFieldIdstringRequiredThe custom field Id obtained after successful custom field creation needs to be passed to edit the custom field.

Request body

FieldNamestringThe name of the custom field you want to create. For example, you can use "My Custom Field" as the field name.
FieldDescriptionstringA brief description or additional information about the custom field.
FieldOrderstringThe order or position of the custom field within a list of form fields.
BrandIdstringThe unique identifier associated with the brand for which the custom field is being created. This property allows you to associate the custom field specifically with a particular brand within your organization.
SharedFieldbooleanThis property indicates whether the custom field is intended to be shared across users within your organization. If set to true, the field will be accessible and visible to all users in your organization. On the other hand, if set to false, the field will be specific to your individual account and not visible or accessible to other users. Choose true or false based on your specific requirements.

FormFieldobject

The custom form field associated with the brand.

fieldTypestring

Type of the form field. The available values are Signature, Initial, CheckBox, TextBox, Label, DateSigned, Image, Attachment, EditableDate, Hyperlink, Formula and Dropdown. The Formula field is only available in the beta version.

Note : To add Email, Name, Title, and Company fields via API, use TextBox fields with the validation type set to Regex .

widthfloatWidth of the form field. The width must be greater than zero.
heightfloatHeight of the form field. The height must be greater than zero.
isReadOnlybooleanDecides whether this form field is readOnly or not.
isRequiredbooleanDecides whether this form field is required to be filled or not.
valuestringValue to be displayed on the label form field.
fontSizefloatSize of the font. The default size font is 13.0 .
font stringFont family. The values are Courier, Helvetica,and TimesNewRoman. The default font family is Helvetica.
fontHexColorstringColor of the font. The value should be a hex color code. Example - #035efc.
isBoldFontbooleanDecides whether the font should be in bold or not.
isItalicFontbooleanDecides whether the font should be in italic or not.
isUnderLineFontbooleanDecides whether the font should be underlined or not.
lineHeightintegerHeight of a line in the text. The default line height is 15.0 .
characterLimitintegerLimits the number of characters in the text. The character limit value must be greater than zero.
placeHolderstringA hint text to be displayed in the textbox form field by default.
validationTypestringType of validation for the textbox form field. The values are Only Numbers, Regex, Currency, Email and None. The default validation type is None .
validationCustomRegexstringValue for regex validation. This is applicable when the validationType is set to Regex.
validationCustomRegexMessagestringDescription for regex validation. This message is displayed when the signer enters an invalid regex format value in the textbox form field.
dateFormatstringFormat of the date to be displayed on the date signed form field. The default value is MM/dd/yyyy. When null is provided, the value is inherited from the business profile settings of your account. Accepted formats are
  • MM/dd/yyyy (02/08/2024)
  • dd/MM/yyyy (08/02/2024)
  • dd-MMM-yyyy (08-Feb-2024)
  • MMM-dd-yyyy (Feb-08-2024)
  • MMM dd, yyyy (Feb 08, 2024)
  • dd MMM, yyyy (08 Feb, 2024)
  • yyyy, MMM dd (2024, Feb 08)
  • yyyy/MM/dd (2024/02/08)
  • dd-MM-yyyy (08-02-2024)
  • MM-dd-yyyy (02-08-2024)
  • yyyy-MM-dd (2024-02-08)
timeFormatstringFormat of the time to be displayed on the date signed form field. When null is provided, the value is inherited from the business profile settings of your account. Accepted formats are
  • hh:mm tt (12:30 PM)
  • h:mm tt (2:45 PM)
  • HH:mm (14:30)
  • H:mm (9:15)
  • hh:mm:ss tt (12:30:15 PM)
  • h:mm:ss tt (2:45:30 PM)
  • HH:mm:ss (14:30:10)
  • H:mm:ss (9:15:40)
  • None (Disabled, no time will be displayed)

imageInfoobject

Options to customize the image form field.

titlestringTitle of the image form field.
descriptionstringDescription of the image form field.
allowedFileExtensionsstringControls the image formats that are allowed to upload on the image form field. The values are .jpg or .jpeg, .svg, .png, and .bmp.

attachmentInfoobject

Options to customize the attachment form field.

titlestringTitle of the attachment form field.
descriptionstringDescription of the attachment form field.
allowedFileTypesstringControls the file formats that are allowed to upload on the attachment form field. The values are PDF, Document, and Image.

editableDateFieldSettingsobject

Options to customize the editable date form field.

dateFomatstring

BoldSign API supports a variety of date-time formats, including:

  • MM/dd/yyyy
  • dd/MM/yyyy
  • dd-MMM-yyyy
  • MMM-dd-yyyy
  • MMM dd,yyyy
  • dd MMM,yyyy
  • yyyy,MMM dd
  • yyyy/MM/dd
  • dd-MM-yyyy
  • MM-dd-yyyy
  • yyyy-MM-dd

Format of the date to be displayed on the date signed form field. The default value is MM/dd/yyyy.

minDatestring

The minimum date that can be selected. The string should be in date-time format. The default ISO standard YYYY-MM-DDTHH:MM:SSZ.

Example Format

minDate : 2024-01-01T00:00:00Z

The date-time should be passed in UTC timezone using Z (e.g., 2024-01-01T00:00:00Z).

If using a specific timezone, provide the UTC offset:

  • IST (UTC+5:30): 2024-01-01T00:00:00+05:30
  • PST (UTC-8:00): 2024-01-01T00:00:00-08:00

maxDatestring

The maximum date that can be selected. The string should be in date-time format. The default ISO 8601 standard YYYY-MM-DDTHH:MM:SSZ.

Example Format

maxDate : 2025-12-31T23:59:59Z

Pass the date-time in UTC timezone using Z (e.g., 2025-12-31T23:59:59Z).

For specific timezones, provide the UTC offset:

  • EST (UTC-5:00): 2025-12-31T23:59:59-05:00
  • CET (UTC+1:00): 2025-12-31T23:59:59+01:00
hyperLinkTextstringText to be displayed for the hyperlink.
dataSyncTagstringThe value that can be specified on two or more textbox form fields to sync them.
dropDownOptionsarrayThe values that have to be displayed on the dropdown form field. One or more values can be specified.
textAlignstringDetermines the horizontal alignment of text for the textbox and label form fields, and can be set to Left, Center or Right. The default of alignment of text is Left.
textDirectionstringDetermines the text direction of text for the textbox and label form fields, and can be set to LTR or RTL. The default text direction is LTR.
characterSpacingfloatDetermines the character spacing of text for the textbox and label form fields. It can be set as a floating-point value.
idPrefixstringThis property holds the initial part of the ID which will be combined with a numerical count.
restrictIdPrefixChangebooleanThis boolean property indicates whether the modification of the ID prefix is allowed or not. When set to true, it restricts the sender from altering the ID prefix.
backgroundHexColorstringThis property specifies the color that will be used for the background of the label field. The value should be a hex color code. Example - #FFFFFF.

Example response

200 Success

{
  "customFieldId": "e33502d4-xxxx-xxxx-xxxx-6v3n85d51948",
  "message": "Custom field edited successfully."
}