Copy Forms Between Accounts - example

Last updated Feb 05 2019
This feature will allow you to easily copy forms between accounts, or between Sandbox and Production.
Before you can use this feature you will need to enable the formtitan api usage at => My Account => Api.
Formtitan endpoint url, you can find your subdomain at => My Account => Profile => Subdomain. 


 json sample, you can build this dynamically via apex.
destination formtitan apiKey, can be found at your destination formtitan account at => My Account => Api. 


the DestinationftUserName is your subdomain,you can find your subdomain at => My Account => Profile => Subdomain. 
the formId can be found at => Form Settings => General => Form ID. 


string json2post = '{ "DestinationftAPIKey": "destinatinationApiKey", "DestinationftUserName": "your-destination-subdomain", "Forms": [ { "formID": "1040449", "formName": "test export" }, { "formID": "1040450", "formName": "test export1" } ] }';
HttpRequest req = new HttpRequest();
req.setEndpoint(endpointUrl);
req.setMethod('POST');
req.setHeader('Content-Type', 'application/json');
// origin formtitan apiKey, can be found at => My Account => Api. 
req.setHeader('ftAPIKey', 'originapiKey');
req.setBody(json2post);
Http http = new Http();
HTTPResponse res = http.send(req);
System.debug('res body>>> ' +res.getBody());
 
// sample response from formtitan 
{
  "success": true,
  "data": [
    {
      "sourceFormID": 1040449,
      "formID": 1040456,
      "formName": "test export",
    }
  ]
}





CommentsLogin Required
Didn’t find what you were looking for?
Try the following for assistance or Use the Search box.