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

Request Type:

  • POST

Scope required

  • ZohoCampaigns.contact.CREATE

Other alternative scopes

  • ZohoCampaigns.contact.CREATE-UPDATE (CREATE + UPDATE)
  • ZohoCampaigns.contact.WRITE (CREATE + UPDATE + DELETE)
  • ZohoCampaigns.contact.ALL (CREATE + UPDATE + DELETE + READ)

Header:

Authorization: Zoho-oauthtoken <access_token>

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

Request URL:

https://campaigns.zoho.com/api/v1.1/custom/add

API Limit

  • Duration: 5 mins
  • Number of Calls: 100
  • Lock Period: 30 mins

You can send 100 API calls per 5 minutes. If you hit this limit, you can't use this API for the next 30 minutes due to security reasons, but you can still use other APIs if their lock period hasn’t been reached.

List of Parameters -- Version 1.1

ParameterData TypeDescription
type*Stringxml (or) json
fieldname*StringAlphanumeric
fieldtype*String[Text|Integer|Phone|Date|Picklist|Email|Checkbox|LongInteger|URL|
textarea|RadioOption|Multiselect|DateTime|Decimal|Percent]
fieldlengthNumberThis lets you to set length of the field. Default value is 20.

* - Mandatory Parameters

Possible Error Cases

Error codeDescription
903Mandatory fields are missing.
910 No fields found.
914You cannot add contacts as you've reached the maximum limit.
916Duplicate custom field found.

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

Sample XML Request

Copiedhttps://campaigns.zoho.com/api/v1.1/custom/add?type=xml&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</message><response>
	<message>Success</message>
	<mandatory_check>success</mandatory_check>
	<fieldtype>Text</fieldtype>
	<authtoken>[API Authentication_Token]
	</authtoken>
	<scope>CampaignsAPI</scope>
	<code>200</code>
	<type>xml</type>
	<uri>/api/v1.1/custom/add</uri>
	<fieldname>FIELDNAME</fieldname>
</response>

Sample JSON Request

Copiedhttps://campaigns.zoho.com/api/v1.1/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.1/custom/add",
    "fieldname": "FIELDNAME1",
    "fieldlength": "10"
  }
}