Move to Folder

Move Template to another Folder

HTTP Request

POST https://api.docspring.com/api/v1/templates/<TEMPLATE_ID>/move

Authentication

You must send an Authorization header with the value Basic followed by base 64 encoded token_id:token_secret.

For example: Authorization: Basic dG9rZW5faWQ6dG9rZW5fc2VjcmV0Cg==

See the Authentication documentation for more information.

Parameters

The request body must be a JSON object with the following properties:

  • parent_folder_id (string, optional): The folder id to move the folder into. Omit this parameter to move to root folder

Example Response

{
  "id": "tpl_000000000000000001",
  "name": "Template 1",
  "public_web_form": false,
  "public_submissions": false,
  "template_type": "pdf",
  "document_state": "pending",
  "document_filename": "test-document.pdf",
  "document_processed": true,
  "expire_submissions": true,
  "expire_after": 7,
  "expiration_interval": "days",
  "allow_additional_properties": false,
  "editable_submissions": false,
  "page_count": 0,
  "page_dimensions": [[612, 792]],
  "webhook_url": null,
  "path": "/Folder 2",
  "slack_webhook_url": null,
  "redirect_url": null
}

Example Code

import DocSpring from 'docspring'

const config = new DocSpring.Configuration()
config.apiTokenId = 'API_TOKEN_ID'
config.apiTokenSecret = 'API_TOKEN_SECRET'
client = new DocSpring.Client(config)

var data = {
  parent_folder_id: 'fld_000000000000000002',
}

var templateId = 'tpl_000000000000000001'
client.moveTemplateToFolder(
  templateId,
  data,
  function (error, template, response) {
    if (error) {
      console.log(response.body)
      return
    } else {
      console.log(template)
    }
  }
)

results matching ""

    No results matching ""