# Add listing via API

**URL:** <https://community.hivepress.io/t/add-listing-via-api/5530>\
**Category:** HivePress\
**Tags:** code\
**Created:** [April 27, 2023, 6:19am UTC](https://community.hivepress.io/t/add-listing-via-api/5530 "2023-04-27T06:19:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![highwayman](https://community.hivepress.io/user_avatar/community.hivepress.io/highwayman/32/5035_2.png) [@highwayman](https://community.hivepress.io/u/highwayman)\
**Post date:** [April 27, 2023, 6:19am UTC](https://community.hivepress.io/t/add-listing-via-api/5530/1 "2023-04-27T06:19:23Z")

</div>

Is it possible to add listings via API? We currently have a Python script for creating listing descriptions with OpenAI API, and would love to extend its functionality to be able add listings automatically with the REST API- however I noticed the current endpoints were only for updating, deleting, hiding, and reporting listings.

---

<div class="post-metadata">

**Author:** ![ihor](https://community.hivepress.io/user_avatar/community.hivepress.io/ihor/32/5_2.png) [@ihor](https://community.hivepress.io/u/ihor)\
**Post date:** [April 28, 2023, 9:10am UTC](https://community.hivepress.io/t/add-listing-via-api/5530/3 "2023-04-28T09:10:33Z")

</div>

Yes, unfortunately there’s no 100% REST API coverage yet but it’s on the roadmap. You can use the default WP REST API as a temporary fallback [Posts | REST API Handbook | WordPress Developer Resources](https://developer.wordpress.org/rest-api/reference/posts/)

---

<div class="post-metadata">

**Author:** ![enika.leia](https://community.hivepress.io/user_avatar/community.hivepress.io/enika.leia/32/5188_2.png) [@enika.leia](https://community.hivepress.io/u/enika.leia)\
**Post date:** [April 29, 2023, 11:01am UTC](https://community.hivepress.io/t/add-listing-via-api/5530/4 "2023-04-29T11:01:35Z")

</div>

HTML  
HTML  
Raw  
it doesn’t work.  
this code  
post\_date = {  
“title”: “test\_title\_listing”,  
“content”: “content\_test content\_test”,  
“status”: “publish”,  
“type”: “hp\_listing”,  
“author”: 2  
}  
r = requests.post(‘[https://домен.com/wp-json/wp/v2/posts’](https://xn--d1acufc.com/wp-json/wp/v2/posts%E2%80%99), headers=header, json=post\_date)  
must create “type”: “hp\_listing”  
but creates “type”: “post”

---

<div class="post-metadata">

**Author:** ![ihor](https://community.hivepress.io/user_avatar/community.hivepress.io/ihor/32/5_2.png) [@ihor](https://community.hivepress.io/u/ihor)\
**Post date:** [April 29, 2023, 10:47pm UTC](https://community.hivepress.io/t/add-listing-via-api/5530/5 "2023-04-29T22:47:16Z")

</div>

Please also provide the post type “hp\_listing”, this endpoint should support custom post types.

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [May 29, 2023, 10:47pm UTC](https://community.hivepress.io/t/add-listing-via-api/5530/6 "2023-05-29T22:47:19Z")

</div>

Closed on May 29, 2023, 10:47pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
