To get the raw content, you need to pass the context
argument as edit
. This is the version of the content that’s used in the editor, and should match the raw data you originally sent. This version of the content will be accessible at content.raw
.
Note that using this context may require the request to be authenticated, as the current user will need permission to edit the post to see the raw content.
Related Posts:
- Filter post_content before loading in Gutenberg editor
- How to: Make JWT-authenticated requests to the WordPress API
- How would I add custom tables/endpoints to the WP REST API?
- WP REST API create post authentication issue
- Why is my custom API endpoint not working?
- WordPress REST API validation
- Are there server performance benefits to fetching only specific fields when querying the REST API?
- How do I correctly setup an AJAX nonce for WordPress REST API?
- WordPress Rest API: How do we validate with our custom API key?
- Adding WordPress API Endpoint With Multiple Parameters
- Using the REST API (v2) javascript client on a private namespaced route
- authentication issue with rest api – rest_cannot_create
- Hiding API routes list
- Match REST API post output from custom endpoint
- Paragraphs removed when using get_post_custom()?
- How to change user avatar using REST API?
- Accessing WordPress data via JSON gives HTML data for certain keys
- rest api authentication
- Does accessing WordPress via REST API affect the site stats and analytics?
- x-wp-nonce is not allowed by Access-Control-Allow-Headers in preflight response
- How to get around WP REST API per page limit without pagination?
- Build on same WordPress or different install?
- Testing custom API endpoint with class dependency
- How to properly add custom entities in Gutenberg
- Not all featured image sizes available in Rest API
- 403 Forbidden with gutenberg
- WordPress doesn’t send a notification email when submitting a comment using REST API
- Using WordPress RESTapi to call a php file instead of post or page
- Detect if REST API is running
- WordPress REST API – Modify JSON before importing
- Using pre_get_posts, how to target the REST API, only?
- Save/update post_meta with Gutenberg from the panel
- Set featured image using URL with wp rest api
- How to block all REST API endpoint except which I wrote custom?
- Authentication with internal WP_REST_Request and rest_do_request()
- pagination in WP rest api
- Can the new REST API now make WP into it’s own push notification server?
- Confused about AngularJS and WordPress
- Post API tax_relation field doesn’t work
- Cannot DIsplay a Snackbar Notice on Button Click – Notice is undefined
- How to post an unserialized array via wordpress rest API as meta data
- Use the backbone.js client to save custom post type meta
- Override WordPress POST REST API
- Custom Post Type and Custom REST API Endpoint result in Gutenberg editor not working
- rest_sanitize_value_from_schema doesn’t sanitize string
- Erratic OAuth 1.0 Signature Mismatch Errors
- Creating a custom endpoint for rest, I see the endpoint exists in the wp-json, but the request is returning 404
- WordPress Rest API custom endpoint for RSS feed
- How to add a custom REST field to limit data when fetching?
- Get subscribers via REST API and send post notification
- WordPress JSON data to and from database to be shown on rest point
- “No Access-Control-Allow-Origin header is present” even though it is in the entry file
- REST API authentication for a plugin
- rest api request including meta_query filter
- Rest API basic auth not working
- Filter DELETE REST API calls
- Rest API: wp_verify_nonce() fails despite receiving correct nonce value
- Update user meta via REST API?
- How to call wp plugin REST functions without curl?
- Disable part of endpoints wordpress api
- Get a term object using getEntityRecords
- Creating a WordPress Post via REST API – HTML or Markdown?
- How to send the body in wp_remote_post as “raw”?
- Backbone with custom rest endpoints
- rest Api jwt authentication for get methodes
- Is there a way I can fetch the WordPress Developer Code References with an API?
- Pull in ALL posts from the last two weeks using Rest API
- How to add an endpoint to WP
- How to set up the REST API to refer to media on a CDN
- 403 error when publishing a post in wordpress. Error => Publishing failed. The response is not a valid JSON response
- IIS Authorization Rules breaks WP REST-API and results in fail in Site Health
- How to delete all instances of the image using REST API
- REST API connection on another site with post information and permalink
- Performance of WordPress Rest API vs WordPress Feeds
- trigger WordPress rest any API call
- WordPress REST API in Integromat: How to overcome “Sorry, you are not allowed to list users / edit this…”
- WP REST API returns empty posts despite entries in wp_posts
- The REST API encountered an error in wordpress?
- Do something when publish a post in Gutenberg with hook rest_after_insert_post
- Uploading picture via REST API
- How to modify the HTML output of Gutenberg block? (Youtube)
- rest api add post meta
- Can’t access 3rd party API, code works on local server but not on wordpress
- phpmailer_init ignored on REST calls
- Autotrader API Integration
- order by meta start_dato value (ACF)
- Display Post Featured Image along with Categories via WP Rest API
- Register rest field authentication with REST API
- Accessing secure endpoint with X-WP-Nonce?
- Handling _embed for custom REST API endpoints
- Restructure Objects coming from Rest-Api
- Rest api request throttling
- Get custom data from the user REST API endpoint
- Custom rest api endpoint response json problem
- JS WordPress API fetch no response headers
- Rest API nonce is being cached
- WordPress custom endpoint returns Security violated
- custom REST endpoints and application passwords
- wordpress rest api authentication failed
- WordPress REST API custom endpoint not allowing multiple parameters