# Looking how to send message with image preview via Talk API

**URL:** <https://help.nextcloud.com/t/looking-how-to-send-message-with-image-preview-via-talk-api/238206>\
**Category:** 💬 Talk (spreed)\
**Tags:** api, curl, talk-app\
**Created:** [January 5, 2026, 8:32pm UTC](https://help.nextcloud.com/t/looking-how-to-send-message-with-image-preview-via-talk-api/238206 "2026-01-05T20:32:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![emzi](https://help.nextcloud.com/letter_avatar/emzi/32/6_449c533f586939b6e5f246632a46421f.png) [@emzi](https://help.nextcloud.com/u/emzi)\
**Post date:** [January 5, 2026, 8:32pm UTC](https://help.nextcloud.com/t/looking-how-to-send-message-with-image-preview-via-talk-api/238206/1 "2026-01-05T20:32:52Z")

</div>

Hello,

I am tying to create a script that would send messages to existing conversation. Message would consist of a text and a link to the previously shared image. The goal is to have these messages well-looking with image displayed as clickable preview. I tried a number of approaches, but none of them worked good enough: sharing a file via `ocs/v2.php/apps/files_sharing/api/v1/shares`endpoint won’t allow to add text (was unable to make talkMetaData→caption work). Sharing a file and adding a link to it to the message works but I could not find a way to nicely format it (simple link even with automatic preview looks quite ugly). Sharing rich object (endpoint: /chat/{token}/share) won’t allow to add comments as well.

Any comments, corrections or ideas are highly appreciated, thanks in advance.
