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
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
| Property | Type | Comment |
|---|---|---|
| provider | String | Required. The provider of the document. Must be "KanbanFlow". |
| kanbanFlowType | String | Required. The type of the document. Must be "textDocument". |
| name | String | Required. The name of the document. Cannot be empty. The ending ".txt" is added if it is missing. |
| content | String | The content of the document. |