# Send images with api

**URL:** <https://forum.mattermost.com/t/send-images-with-api/16474>\
**Category:** Troubleshooting\
**Created:** [July 22, 2023, 10:13am UTC](https://forum.mattermost.com/t/send-images-with-api/16474 "2023-07-22T10:13:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nedite8864](https://avatars.discourse-cdn.com/v4/letter/n/54ee81/32.png) [@nedite8864](https://forum.mattermost.com/u/nedite8864)\
**Post date:** [July 22, 2023, 10:13am UTC](https://forum.mattermost.com/t/send-images-with-api/16474/1 "2023-07-22T10:13:20Z")

</div>

Hi! I have a binary (png) on n8n and would like to forward it to Mattermost. The Mattermost API says to use file\_ids but does not explain exactly what to put inside it.

Can anyone please help?

---

<div class="post-metadata">

**Author:** ![nedite8864](https://avatars.discourse-cdn.com/v4/letter/n/54ee81/32.png) [@nedite8864](https://forum.mattermost.com/u/nedite8864)\
**Post date:** [July 28, 2023, 10:09am UTC](https://forum.mattermost.com/t/send-images-with-api/16474/2 "2023-07-28T10:09:36Z")

</div>

Solution I got from reddit: So I haven’t actually tried it to be able to give you the exact example, but it looks like you have to actually upload the file first using the [`](https://vidmate.onl/)api/v4/files` endpoint, which will give you the file id, and then you can use that ID in the `api/v4/posts` call.
