# How to upload image using Discourse API

**URL:** https://meta.discourse.org/t/how-to-upload-image-using-discourse-api/148869
**Category:** Development
**Tags:** rest-api
**Created:** [April 22, 2020, 3:23pm UTC](https://meta.discourse.org/t/how-to-upload-image-using-discourse-api/148869 "2020-04-22T15:23:55Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [September 22, 2020, 4:23pm UTC](https://meta.discourse.org/t/how-to-upload-image-using-discourse-api/148869/3 "2020-09-22T16:23:19Z")

</div>

The parameter for `file` needs to be called `files[]`. See this response for an example using Postman:

> [@Upload avatar image with API](https://meta.discourse.org/t/upload-avatar-image-with-api/55253/7):
>
> Okay I just verified that I got this to work. You just need to add the synchronous: true value to get the id. now that we have the id: 17 we can then make one more request:

---

_[View the full topic](https://meta.discourse.org/t/how-to-upload-image-using-discourse-api/148869)._
