Folders

Creates a new folder by copying a source folder (template_id) into a target project. By default only the folder shell is copied; enable the copy_* flags to duplicate its task lists, tasks, and their details.

Required: name, template_id (the source folder), and project_id.

Copy flags

Copying cascades through levels: enable copy_task_lists to bring over the folder's task lists, then copy_open_tasks / copy_closed_tasks to bring over their tasks, then the per-task flags to bring over task details. All copy_* flags default to false.

Flag(s)PrerequisiteNotes
copy_task_lists—The "task lists" gate
copy_open_tasks, copy_closed_taskscopy_task_listsThe "tasks" gate
copy_task_comments, copy_task_description, copy_task_subscribers, copy_task_attachmentscopy_open_tasks or copy_closed_tasks—
copy_task_open_todos, copy_task_closed_todoscopy_open_tasks or copy_closed_tasks—
copy_task_open_subtasks, copy_task_closed_subtaskscopy_open_tasks or copy_closed_tasks—
copy_task_dependenciescopy_open_tasks or copy_closed_tasks—
copy_assignees, copy_tags, copy_date, copy_repeat, copy_estimatecopy_open_tasks or copy_closed_tasks—
copy_custom_fieldscopy_open_tasks or copy_closed_tasksTask custom field values

Enabling tasks without copy_task_lists returns 422 (task_lists_required); enabling any per-task flag without a tasks gate returns 422 (tasks_required).

Minimal copy (shell only)

{
  "data": {
    "type": "folders",
    "attributes": {
      "name": "Design (copy)",
      "template_id": 88440,
      "project_id": 31002
    }
  }
}

Full copy with task lists and tasks

{
  "data": {
    "type": "folders",
    "attributes": {
      "name": "Design (copy)",
      "template_id": 88440,
      "project_id": 31002,
      "copy_task_lists": true,
      "copy_open_tasks": true,
      "copy_task_comments": true,
      "copy_task_description": true,
      "copy_task_subscribers": true,
      "copy_task_attachments": true,
      "copy_task_open_todos": true,
      "copy_task_open_subtasks": true,
      "copy_task_dependencies": true,
      "copy_assignees": true,
      "copy_tags": true,
      "copy_date": true,
      "copy_repeat": true,
      "copy_estimate": true,
      "copy_custom_fields": true
    }
  }
}
post/api/v2/folders/copy

Request

  • Base URL
    https://developer.productive.io (the document declares no server; this is the origin it was published from)
  • URL
    https://developer.productive.io/api/v2/folders/copy
  • Auth
    none declared

Request body

Example request

{
  "data": {
    "type": "folders",
    "attributes": {
      "name": "Design (copy)",
      "template_id": 88440,
      "project_id": 31002
    }
  }
}

Response

A single folder resource response.

Example response

{
  "data": {
    "id": "5522",
    "type": "folders",
    "attributes": {
      "name": "Features",
      "position": 1,
      "placement": 1000000,
      "archived_at": null,
      "hidden": false
    },
    "relationships": {
      "project": {
        "data": {
          "type": "projects",
          "id": "6899"
        }
      }
    }
  },
  "included": []
}

Changes

    • warning

      added the new bad_decimal_format enum value to the // response property for the response status

    • warning

      added the new non_finite_number enum value to the // response property for the response status

    • warning

      added the new null_bytes_in_params enum value to the // response property for the response status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • breaking

      the // response's property type changed from string to no type, and format from date-time to no format for status

    • breaking

      the // response's property type changed from integer to no type for status

    • breaking

      the // response's property type changed from integer to no type for status

    • warning

      deleted the header request parameter X-Organization-Id

    • info

      added to the // response property anyOf list for the response status

    • info

      added to the // response property anyOf list for the response status

    • info

      added subschema #2 to the // response property anyOf list for the response status

    • info

      added subschema #2 to the // response property anyOf list for the response status

    • info

      added subschema #2 to the // response property anyOf list for the response status

    • info

      removed subschema #1: Single data from the // response property anyOf list for the response status

    • info

      removed subschema #1: Single data from the // response property anyOf list for the response status

    • info

      the response property //// became required for the status

    • info

      the response property ///// became required for the status

    • info

      the response property //// became required for the status

    • info

      the response property ///// became required for the status

    This list may be incomplete.