Add text documentPOST

Description

Adds a text document to a task. The document is added as an attachment with the provider KanbanFlow and the kanbanFlowType textDocument.

Uses the same URL as Add attachment, but with a JSON request body instead of form data.

Permissions

The API token needs the Edit tasks permission.

Request format

curl -X POST https://kanbanflow.com/api/v1/tasks/<TASK_ID>/attachments -H "Content-type: application/json"
 -d '{ "<PROPERTY_1>": <PROPERTY_VALUE_1>, "<PROPERTY_2>": <PROPERTY_VALUE_2> }'

Example request

curl -X POST https://kanbanflow.com/api/v1/tasks/T3s6UGyzY/attachments -H "Content-type: application/json"
 -d '{ "provider": "KanbanFlow", "kanbanFlowType": "textDocument", "name": "Meeting notes", "content": "# Meeting notes\n\n- Lorem ipsum dolor sit amet" }'

Example response

{
    "taskAttachmentId": "Ad7KpX2mQ"
}

Valid properties

PropertyTypeComment
providerStringRequired. The provider of the document. Must be "KanbanFlow".
kanbanFlowTypeStringRequired. The type of the document. Must be "textDocument".
nameStringRequired. The name of the document. Cannot be empty. The ending ".txt" is added if it is missing.
contentStringThe content of the document.