Creator API

REST API - Add Records

URL

https://creator.zoho.com/api/<ownername>/<format>/<applicationName>/form/<formName>/record/add/

where <ownername> is the admin username which can be obtained using zoho.adminuser or zoho.appuri variables. You can also view your app URL in the URL bar of your browser for example, <https://creator.zoho.com/<ownername>/<applicationname>/...> to obtain the <ownername>.
<applicationName> and <formName> are the link names of your application and form as can be referred from here
and <format> is the type of response format as listed below.

Formats

xml, json

HTTP Method

POST

Parameters

Parameter Name Usage Description
authtoken Required. A valid API authtoken. Refer https://api.creator.zoho.com/Generate-Auth-Token.html for generating authtoken.
scope Required Specify the value as creatorapi
<field name> Required. <field name> is the link name of a field. This parameter's value specifies the value to be set for that field. Refer to this page for the link names used in your applications.

Prerequisites

Notes

  • You can add only one record in one form at a time.
  • Multiple picklist values must be separated by a comma.
  • Only the owner of the application can add a record to a private Form.
  • Anyone with a valid auth token can add a record to a public Form.
  • Any user with a valid auth token and share permission can add a record to a shared Form.
  • Mandatory form fields cannot be left blank in the add request.
  • The record ID of the new entry is returned along with the field values passed in the request.

Sample Request

<form method="POST" action="https://creator.zoho.com/api/sampleapps/xml/sample/form/Employee/record/add/">
<input type="hidden" name ="authtoken" value="***************">
<input type="hidden" name ="scope" id="scope" value="creatorapi">
<input type="text" name="Name" value="Gary">
<input type="text" name="DOB" value="12-Jun-1980">
<input type="text" name="Address" value="USA">
<input type="text" name="Basic" value="10000">
<input type="text" name="Hobbies" value="Reading,Writing">


<input type="submit" value="Add Record">
</form>

Sample Response

XML response

<response>
    <result>
        <form name="Employee">
            <add>
                <values>
                     <field name="Name">
                            <value>Gary</value>
                     </field>
                     <field name="DOB">
                            <value>12-Jun-1980</value>
                     </field>
                     <field name="Basic">
                            <value>10000</value>
                     </field>
                     <field name="Address">
                            <value>USA</value>
                     </field>
                    <field name="Hobbies">

                            <options>
                                   <option>Reading</option>
                                   <option>Writing</options>
                            </options>

                     </field>
                     <field name="ID">
                           <value>89597000010897003</value>
                     </field>
                     <field name="dateFormat">
                           <value>dd-MMM-yyyy</value>
                     </field>
                     <field name="timeZone">
                            <value>America/Los_Angeles</values>
                     </field>
                 </values>
                 <status>Success<status>
            </add>
       </form>
    </result>
</response>

JSON response

{{"formname":["RestAPI",{"operation":["add",{"values":{"Name":"Gary","Basic":"10000","Hobbies":["Reading","Writing"],"DOB":"12-Jun-1980","Address":"USA","ID":89597000010897007},"status":"Success"}]}]}

Error Codes

If there is an error in the request format, the corresponding error code with error message will be displayed. Please refer to the topic Error codes and descriptions for the list of error codes. If the operation is successful, the response message will be displayed with status as "Success".

Top