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 requests
import json

url = "https://api.boldsign.com/v1/customField/edit?customFieldId=<customFieldId>"

payload = json.dumps({
  "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"
  }
})
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json;odata.metadata=minimal;odata.streaming=true',
  'Authorization': '{{apiKey}}'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

const axios = require('axios');
let data = JSON.stringify({
  "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"
  }
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.boldsign.com/v1/customField/edit?customFieldId=string',
  headers: { 
    'Content-Type': 'application/json', 
    'Accept': 'application/json;odata.metadata=minimal;odata.streaming=true', 
    'Authorization': '{{apiKey}}'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

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.
SharedFieldstringThis 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.

fieldTypestringType of the form field. The available values are Signature, Initial, CheckBox, TextBox, Label, DateSigned, Image, Attachment, EditableDate, Hyperlink, and Dropdown.
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.
font stringFont family. The values are Courier, Helvetica, and TimesNewRoman.
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.
characterLimitintegerLimits the number of characters in the text.
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.
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.
timeFormatstringFormat of the time to be displayed on the date signed form field. The default value is None.

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 image 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.

dateFomatstringFormat of the date to be displayed on the date signed form field. The default value is MM/dd/yyyy.
minDatestringThe minimum date that can be selected. The string should be in date-time format.
maxDate stringThe maximum date that can be selected. The string should be in date-time format.
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.
textDirectionstringDetermines the text direction of text for the textbox and label form fields, and can be set to LTR or RTL.
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."
}