Capsule API v2 Docs Updated - Uploading and Viewing Attachments

116 views
Skip to first unread message

Tom Bell

unread,
Apr 19, 2018, 5:55:05 AM4/19/18
to Capsule API
Hello!

Just a quick announcement to mention that we've added documentation to our API docs for uploading and viewing attachments.

You can check out the following links for the different endpoints:
An overview of uploading an attachment:

  1. Upload the file using the upload attachment endpoint
  2. Use the token in the response to create an object with a token property in an entry (creating or updating)
  3. Post the entry and the response will contain the attachment details in the attachments property for that entry
An overview of getting an attachment:

  1. Get the attachment ID from the attachments property on an entry
  2. Call the show attachment endpoint using the attachment ID
  3. The response data will be the contents of the file, and filename in the Content-disposition response header

Removing an attachment from an entry:

  1. Add a property "_delete" set to true in the attachment object in the attachments property on an entry
  2. Post the entry, and the attachment will be removed from the entry


The announcement of this update can be found here https://developer.capsulecrm.com/v2/overview/announcements-and-changes

If you have any questions about uploading/viewing attachments please ask here or contact us at sup...@capsulecrm.com

Cindy Sareno

unread,
May 30, 2018, 4:30:07 AM5/30/18
to Capsule API
Hi! I've been having an issue with regards to uploading attachments as I can't get through my HTTP request due to a content-length error. Hoping for our response on this issue asap. Thank you.

daniel...@zestia.com

unread,
May 30, 2018, 4:54:28 AM5/30/18
to Capsule API
Hi Cindy,

Can you share any more details on the error that you're receiving - what's the specific content length error that's being returned? There's a few content length messages that come to mind that it could potentially be. If it would be beneficial to share private code samples you can send them to capsule support at sup...@capsulecrm.com and we'll pick up the conversation there.

When you make a HTTP request to the attachment upload endpoint we require that the content-length HTTP header is set to byte size of the file you're uploading. If this is missing or invalid you'll receive a 415 or 411 HTTP response respectively. There's also a maximum file size of 25mb, so it's worth ensuring the file you're uploading is smaller than this.

Daniel 




Cindy Sareno

unread,
May 31, 2018, 3:32:44 AM5/31/18
to daniel...@zestia.com, Capsule API
Hi,

I have sent the details to sup...@capsulecrm.com. Thanks

Kind Regards,
Cindy

--
You received this message because you are subscribed to the Google Groups "Capsule API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capsule_api+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Cindy G. Sareno
Web Developer
Reply all
Reply to author
Forward
0 new messages