Skip to main content

Template from a form

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

Method: POST

URI: /forms/form_id/user-template

URI Parameters

  • form_id: The ID of the form

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 template.
template_version_idIntegerUnique ID of the template version of the template the template is made from.
agency_idIntegerUnique ID of the agency the template belongs to.
user_idIntegerUnique ID of the user that created the template
nameStringName of the template.
templateBooleanReturns true if the template is a template.
deletedBooleanReturns true if the template is deleted.
finalisedBooleanReturns true if the template is finalised.
privateBooleanReturns true if the template is private.
createdTimestampReturns Unix timestamp of when template was created.
updatedTimestampReturns Unix timestamp of when template was updated.

Example

Request
curl https://app-api.reiformslive.com.au/forms/1/user-template \
--request POST \
--header "content-type: application/json" \
--header "Authorization: Basic YTlkOWIwYItNGY4Yi1hYTQxLTI5NzZmMTcyZmEyMQ==" \
--data '{
"name" : "template Form",
"private" : false,
}'
Response
{
"id": 402,
"template_version_id": 108,
"agency_id": 1,
"user_id": 37,
"name": "template Form",
"template": true,
"deleted": false,
"finalised": false,
"private": false,
"created": 1354678114,
"updated": 1354678114
}