Skip to main content

Duplicating Forms

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

Method: Post

URI: /forms/form_id/duplicate

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 form.
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 https://app-api.reiformslive.com.au/forms/1/duplicate \
--request POST \
--header "content-type: application/json" \
--header "Authorization: Basic YTlkOWIwYItNGY4Yi1hYTQxLTI5NzZmMTcyZmEyMQ==" \
--data '{
"name" : "Duplicated Form",
"private" : false
}'
Response
{
"id": 8454,
"template_version_id": 83,
"agency_id": 1,
"user_id": 2,
"name": "Duplicated Form",
"template": false,
"deleted": false,
"finalised": false,
"private": false,
"created": 1354671153,
"updated": 1354671153
}