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
List of Parameters -- Version 1.1
Parameter | Data Type | Description |
type* | String | xml (or) json |
fieldname* | String | Alphanumeric |
fieldtype* | String | [Text|Integer|Phone|Date|Picklist|Email|Checkbox|LongInteger|URL| |
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 contacts as you've reached the maximum limit. |
916 | Duplicate 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"
}
}