The Blink Developer Community

Welcome to the Blink developer community. You'll find comprehensive guides and documentation to help you start working with Blink as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

Sending Feed Events with Attachments or Images

When sending feed events where the card includes an attachment section or an image section, it is possible to upload a document or image in the call to the Send Feed Event Endpoint and use it in the card.

Firstly, rather than calling the Send Feed Event Endpoint with a JSON body as per the documentation, you should call the endpoint with a Multipart form body. Simply put all the documented fields as key/value pairs in the multipart form.

Then, to send a document or image, add the document or image under the key attachment. You should also send an attachment id under the key attachment_id. Attachment ids must be in the form a-<UUID>. Generate sample UUIDs here. For example a-ca6eb2fd-1327-443f-bbec-5f0856ba25ac is a valid attachment id.

Because you're sending the atttachment id that will be assigned to the attachment you're uploading, you can use it in CardKit seciton fields such as image_url or download_url by specifying the value as<attachment_id>.

For example, if you're uploading an image in the attachment field on the Send Feed Event Endpoint with attachment_id set to a-ca6eb2fd-1327-443f-bbec-5f0856ba25ac. You could then use the image in the CardKit JSON you send in the body field as follows:

         "value":"Here's a nice image"

Updated 2 years ago

Sending Feed Events with Attachments or Images

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.