# Posting a new topic via API

**URL:** <https://meta.discourse.org/t/posting-a-new-topic-via-api/93539>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [July 31, 2018, 5:44am UTC](https://meta.discourse.org/t/posting-a-new-topic-via-api/93539 "2018-07-31T05:44:55Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Tarun\_Sharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tarun_sharma/32/483195_2.png) [@Tarun\_Sharma](https://meta.discourse.org/u/Tarun_Sharma)\
**Post date:** [January 29, 2025, 7:12am UTC](https://meta.discourse.org/t/posting-a-new-topic-via-api/93539/7 "2025-01-29T07:12:16Z")

</div>

How to send an image in the create post api. Because in docs in api request there is no key mention for image.  
[https://docs.discourse.org/#tag/Posts/operation/createTopicPostPM](https://docs.discourse.org/#tag/Posts/operation/createTopicPostPM)

```plaintext
{
  "title": "string",
  "raw": "string",
  "topic_id": 0,
  "category": 0,
  "target_recipients": "blake,sam",
  "target_usernames": "string",
  "archetype": "private_message",
  "created_at": "string",
  "reply_to_post_number": 0,
  "embed_url": "string",
  "external_id": "string"
}

```

---

_[View the full topic](https://meta.discourse.org/t/posting-a-new-topic-via-api/93539)._
