Create custom fields

Custom fields can be used to feed any type of information, set character limit and use them to save specific data.Using this API, you can create custom fields to store unique information about leads.

Scope required

  • ZohoMarketingAutomation.lead.CREATE

Other alternative scopes

  • ZohoMarketingAutomation.lead.CREATE-UPDATE (CREATE + UPDATE)

  • ZohoMarketingAutomation.lead.WRITE (CREATE + UPDATE + DELETE)

  • ZohoMarketingAutomation.lead.ALL (CREATE + UPDATE + DELETE + READ)

Header:

Authorization: Zoho-oauthtoken <access_token>

Content-Type: application/x-www-form-urlencoded

Request type:

  • Post

Request URL

https://marketingautomation.zoho.com/api/v1/custom/add

List of parameters

Parameter

Data type

Description

type*

String

json

fieldname*

String

Alphanumeric

fieldtype*

String

 

  • Text
  • Integer
  • Phone
  • Date
  • Picklist
  • Email
  • Checkbox
  • LongInteger
  • URL
  • textarea
  • RadioOption
  • Multiselect
  • DateTime
  • Decimal
  • Percent

 

fieldlength

Number

This lets you to set length of the field. Default value is 20.

* - Mandatory parameters

Possible error cases

Error code

Description

903

Mandatory fields are missing.

910

No fields found.

914

You cannot add leads as you've reached the maximum limit.

916

Duplicate custom field found.

If your error code is not listed above, click here.

Sample request

Copiedhttps://marketingautomation.zoho.com/api/v1/custom/add?type=json&fieldname=FIELD NAME&fieldtype=[Text|Integer|Phone|Date|Picklist|Email|Checkbox|LongInteger|URL|textarea|RadioOption|Multiselect|DateTime|Decimal|Percent]&fieldlength=[number] 

Sample response

Copied{
"response": {
"message": "Success",
"fieldtype": "Text",
"mandatory_check": "success",
"scope": "CampaignsAPI",
"code": "200",
"type": "json",
"uri": "/api/v1/custom/add",
"fieldname": "FIELDNAME1",
"fieldlength": "10"
}
}