Title: Create a ticket with REST API
Last modified: July 15, 2020

---

# Create a ticket with REST API

 *  Resolved [danif10](https://wordpress.org/support/users/danif10/)
 * (@danif10)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/create-a-ticket-with-rest-api/)
 * Hi, I am trying to create a ticket when a button is clicked.
 * I am using AJAX by calling a function that contains the following line of code:
 * $request=wp_remote_post(‘[http://starcatalogo.com/wp-json/wpas-api/v1/tickets&#8217](http://starcatalogo.com/wp-json/wpas-api/v1/tickets&#8217);,
   array(‘status’ => ‘publish’, ‘title’ => ‘test’, ‘content’ => ‘test’));
 * $http_code = wp_remote_retrieve_response_code( $request);
 * edit: the url above is without the ‘&#8217’, I do not know why this number appears
   when publishing the comment.
 * However, no new tickets are created. When retrieving the http code the result
   is 400
 * I would deeply aprreciate your help.
    -  This topic was modified 5 years, 11 months ago by [danif10](https://wordpress.org/support/users/danif10/).
    -  This topic was modified 5 years, 11 months ago by [danif10](https://wordpress.org/support/users/danif10/).
    -  This topic was modified 5 years, 11 months ago by [danif10](https://wordpress.org/support/users/danif10/).
    -  This topic was modified 5 years, 11 months ago by [danif10](https://wordpress.org/support/users/danif10/).
    -  This topic was modified 5 years, 11 months ago by [danif10](https://wordpress.org/support/users/danif10/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Yeison Baron](https://wordpress.org/support/users/yeisonbp/)
 * (@yeisonbp)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/create-a-ticket-with-rest-api/#post-13183617)
 * Hi [@danif10](https://wordpress.org/support/users/danif10/),
 * We unfortunately don’t offer support for the REST API, but we have an extense
   documentation about it:
 * – [https://developer.getawesomesupport.com/documentation/rest-api/introduction-to-the-awesome-support-rest-api/](https://developer.getawesomesupport.com/documentation/rest-api/introduction-to-the-awesome-support-rest-api/)
 * We also have an article regarding creating tickets with the REST API and another
   solution:
 * – [https://getawesomesupport.com/tutorial-create-tickets-using-data-pushed-zapier/](https://getawesomesupport.com/tutorial-create-tickets-using-data-pushed-zapier/)
 * Regards.

Viewing 1 replies (of 1 total)

The topic ‘Create a ticket with REST API’ is closed to new replies.

 * ![](https://ps.w.org/awesome-support/assets/icon-256x256.png?rev=1849681)
 * [Awesome Support - WordPress HelpDesk & Support Plugin](https://wordpress.org/plugins/awesome-support/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/awesome-support/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/awesome-support/)
 * [Active Topics](https://wordpress.org/support/plugin/awesome-support/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/awesome-support/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/awesome-support/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Yeison Baron](https://wordpress.org/support/users/yeisonbp/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/create-a-ticket-with-rest-api/#post-13183617)
 * Status: resolved