Title: API error on my wordpress website
Last modified: August 10, 2023

---

# API error on my wordpress website

 *  [waleeddurrani](https://wordpress.org/support/users/waleeddurrani/)
 * (@waleeddurrani)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/api-error-on-my-wordpress-website/)
 * Hey, I am writing to report an unexpected error I encountered while testing the
   REST API on my WordPress website.
 * Upon testing the REST API, I received an unexpected result that I am unable to
   resolve. Below are the details of the issue:
    - REST API Endpoint: [https://teczer.store/wp-json/wp/v2/types/post?context=edit](https://teczer.store/wp-json/wp/v2/types/post?context=edit)
    - REST API Response: (400) Bad Request
 * I have not been able to identify the root cause of the error. The “Bad Request”
   response prevents me from utilizing the REST API for essential functionalities.
 * I kindly request your expert assistance in resolving this matter. As the REST
   API is integral to the smooth functioning of WordPress and its interactions with
   other applications, addressing this issue promptly is of utmost importance.
 * If any specific details, logs, or further information are required from my end
   to assist in diagnosing and fixing this issue, please do not hesitate to let 
   me know. Your guidance and support in resolving this matter will be greatly appreciated.
 * Thank you for your time and attention to this matter. I look forward to your 
   response and working towards a solution.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fapi-error-on-my-wordpress-website%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/api-error-on-my-wordpress-website/#post-16966725)
 * What were you trying to do when you got that error? Attempting to edit a post
   type record via the API seems quite unusual. Even with proper authentication 
   the expected response is 401 not allowed. A 400 response might be due to improper
   authentication, or some plugin or theme code is preventing the expected response.
 * Even though “edit” is an accepted context, you cannot actually edit post type
   records through the API. You can only look. Post types need to be registered 
   via PHP.
 *  [Coondron](https://wordpress.org/support/users/coondron/)
 * (@coondron)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/api-error-on-my-wordpress-website/#post-17358230)
 * I am currently having this issue as well / causing issues with Jetpack and other
   things running correctly / JSON errors with blocks etc.
 * Does anyone have any solutions to rectifying this problem?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘API error on my wordpress website’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [Coondron](https://wordpress.org/support/users/coondron/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/api-error-on-my-wordpress-website/#post-17358230)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
