# Attachments via API

**URL:** <https://forum.mattermost.com/t/attachments-via-api/9986>\
**Category:** Troubleshooting\
**Created:** [June 18, 2020, 12:37pm UTC](https://forum.mattermost.com/t/attachments-via-api/9986 "2020-06-18T12:37:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkrumpl](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@pkrumpl](https://forum.mattermost.com/u/pkrumpl)\
**Post date:** [June 18, 2020, 12:37pm UTC](https://forum.mattermost.com/t/attachments-via-api/9986/1 "2020-06-18T12:37:42Z")

</div>

Hey there,

I am currently using the mattermost API v4. Everything works properly and I am able to post messages. My question is, if it is possible to use attachments via API?  
[https://docs.mattermost.com/developer/message-attachments.html](https://docs.mattermost.com/developer/message-attachments.html#)

I have already been able to send attachments using incoming webhooks. We are currently using a bot to send messages. Unfortunately, it is not possible to create webhooks for bots. We would like to continue using the API, but would also like to be able to create attachments for messages. Do we have to switch to webhooks or is there any way to create attachments via API?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![pkrumpl](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@pkrumpl](https://forum.mattermost.com/u/pkrumpl)\
**Post date:** [June 18, 2020, 1:01pm UTC](https://forum.mattermost.com/t/attachments-via-api/9986/2 "2020-06-18T13:01:48Z")

</div>

[https://docs.mattermost.com/developer/message-attachments.html#can-i-send-a-message-attachment-via-the-api](https://docs.mattermost.com/developer/message-attachments.html#can-i-send-a-message-attachment-via-the-api)
