Skip to main content

Create Form From User Templates

Description: To create a form from a user template a HTTP POST request is made to the URL with the session token.

Method: POST

URI: /user-templates/template_id/form

URI Parameters:

  • template_id: The ID of the user template.

Parameters

  • name: Name of form

  • 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
idIntegerUnique ID of the form.
template_version_idIntegerVersion ID of the template used to create form.
agency_idIntegerUnique ID of the agency of the form.
user_idIntegerUnique ID of the creator of the form.
nameStringName of the user template.
templateBooleanName of the form.
finalisedBooleanReturns true if form is finalised.
privateBooleanreturns true if form is private.
createdTimestampReturns Unix timestamp of when form was created.
updatedTimestampReturns Unix timestamp of when form was last updated.

Example

Request
curl https://app-api.reiformslive.com.au/user-templates/1/form \
--request POST \
--header "content-type: application/json" \
--header "Authorization: Basic YTlkOWIwYItNGY4Yi1hYTQxLTI5NzZmMTcyZmEyMQ==" \
--data '{
"name" : "New Form",
"private" : false
}'
Response
{
"id": 404,
"template_version_id": 104,
"agency_id": 1,
"user_id": 37,
"name": "New Form",
"template": false,
"finalised": false,
"private": false,
"created": 1354766531,
"updated": 1354766531
}