Help & Support
Follow

LeanKit API (v1): Add an Attachment

This method will upload and add a file attachment to a Card.

Request URL (POST):

https://{accountname}.leankit.com/kanban/api/card/SaveAttachment/{boardId}/{cardId}

This API method requires data sent using POST with a multipart/form-data content type. An encoded file and its filename are required. The Description form value is optional.

Sample request:

https://myaccount.leankit.com/kanban/api/card/SaveAttachment/101000/101622

Sample request body:

Content-Type: multipart/form-data; boundary=----------e3964c7fedba43eb9a8a9bc1058b8f34
Content-Length: 443

------------e3964c7fedba43eb9a8a9bc1058b8f34
Content-Disposition: form-data; name="Description"

Testing attachment.
------------e3964c7fedba43eb9a8a9bc1058b8f34
Content-Disposition: form-data; name="file"; filename="test.txt"
Content-Type: application/octet-stream

This is just a test doc.
------------e3964c7fedba43eb9a8a9bc1058b8f34--

Response

{
  "ReplyData": [ 13 ],
  "ReplyCode": 202,
  "ReplyText": "The Attachment was successfully saved."
}

 

 

 

 

 

 

Doc ID: 1191983822

Have more questions? Submit a request