Skip to main content

Create Forms

Description: To create a form, a HTTP POST request is made to the URL with the form ID and session token.

Method: POST

URI: /forms/

URI Parameters:

  • form_id: The ID of the form.

Required Parameters:

  • name: Name of the form.
  • template_id: Unique ID of the template that the form will be created from.

Parameters

  • private: Whether the form is private or not. If this property is not passed, the users default preference will be used.

Headers: Authorization: Third party based authorization header

Returns

FieldTypeDescription
template_version_idIntegerUnique ID of the template version of the template the form is made from.
agency_idIntegerUnique ID of the agency the form belongs to.
user_idIntegerUnique ID of the user that created the form.
nameStringName of the form.
templateBooleanReturns true if the form is a template.
deletedBooleanReturns true if the form is deleted.
finalisedBooleanReturns true if the form is finalised.
privateBooleanReturns true if the form is private.
createdTimestampReturns Unix timestamp of when form was created.
updatedTimestampReturns Unix timestamp of when form was updated.

Example

Request
curl http://app-api.reiformslive.com.au/forms/ \
--request POST \
--header "content-type: application/json" \
--header "Authorization: Basic YTlkOWIwYItNGY4Yi1hYTQxLTI5NzZmMTcyZmEyMQ==" \
--data '{
"name":"Example Form",
"template_id": 1,
"private": false
}'
Response
{
"id": 1,
"template_version_id": 2,
"agency_id": 1,
"user_id": 1,
"name": "Example Form",
"template": false,
"deleted": false,
"finalised": false,
"private": false,
"created": 1354587703,
"updated": 1354587703
}