GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
author– array
Limit result set to posts assigned to specific authors.
Default:[] -
author_exclude– array
Ensure result set excludes posts assigned to specific authors.
Default:[] -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
menu_order– integer
Limit result set to posts with a specific menu_order value. -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title,menu_order -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses -
tax_relation– string
Limit result set based on relationship between multiple taxonomies.
Enum:AND,OR -
wp2_color– object|array
Limit result set to items with specific terms assigned in the wp2_color taxonomy. -
wp2_color_exclude– object|array
Limit result set to items except those with specific terms assigned in the wp2_color taxonomy. -
wp2_collection– object|array
Limit result set to items with specific terms assigned in the wp2_collection taxonomy. -
wp2_collection_exclude– object|array
Limit result set to items except those with specific terms assigned in the wp2_collection taxonomy. -
wp2_status– object|array
Limit result set to items with specific terms assigned in the wp2_status taxonomy. -
wp2_status_exclude– object|array
Limit result set to items except those with specific terms assigned in the wp2_status taxonomy.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_color– array
The terms assigned to the post in the wp2_color taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
excerpt_length– integer
Override the default excerpt length. -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_color– array
The terms assigned to the post in the wp2_color taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_color– array
The terms assigned to the post in the wp2_color taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_color– array
The terms assigned to the post in the wp2_color taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_color– array
The terms assigned to the post in the wp2_color taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
author– array
Limit result set to posts assigned to specific authors.
Default:[] -
author_exclude– array
Ensure result set excludes posts assigned to specific authors.
Default:[] -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
excerpt_length– integer
Override the default excerpt length. -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
author– array
Limit result set to posts assigned to specific authors.
Default:[] -
author_exclude– array
Ensure result set excludes posts assigned to specific authors.
Default:[] -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
menu_order– integer
Limit result set to posts with a specific menu_order value. -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title,menu_order -
parent– array
Limit result set to items with particular parent IDs.
Default:[] -
parent_exclude– array
Limit result set to all items except those of a particular parent ID.
Default:[] -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses -
tax_relation– string
Limit result set based on relationship between multiple taxonomies.
Enum:AND,OR -
wp2_collection– object|array
Limit result set to items with specific terms assigned in the wp2_collection taxonomy. -
wp2_collection_exclude– object|array
Limit result set to items except those with specific terms assigned in the wp2_collection taxonomy. -
wp2_status– object|array
Limit result set to items with specific terms assigned in the wp2_status taxonomy. -
wp2_status_exclude– object|array
Limit result set to items except those with specific terms assigned in the wp2_status taxonomy.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
excerpt_length– integer
Override the default excerpt length. -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
author– array
Limit result set to posts assigned to specific authors.
Default:[] -
author_exclude– array
Ensure result set excludes posts assigned to specific authors.
Default:[] -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
menu_order– integer
Limit result set to posts with a specific menu_order value. -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title,menu_order -
parent– array
Limit result set to items with particular parent IDs.
Default:[] -
parent_exclude– array
Limit result set to all items except those of a particular parent ID.
Default:[] -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses -
tax_relation– string
Limit result set based on relationship between multiple taxonomies.
Enum:AND,OR -
wp2_collection– object|array
Limit result set to items with specific terms assigned in the wp2_collection taxonomy. -
wp2_collection_exclude– object|array
Limit result set to items except those with specific terms assigned in the wp2_collection taxonomy.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
excerpt_length– integer
Override the default excerpt length. -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
author– array
Limit result set to posts assigned to specific authors.
Default:[] -
author_exclude– array
Ensure result set excludes posts assigned to specific authors.
Default:[] -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
menu_order– integer
Limit result set to posts with a specific menu_order value. -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title,menu_order -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
excerpt_length– integer
Override the default excerpt length. -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
author– array
Limit result set to posts assigned to specific authors.
Default:[] -
author_exclude– array
Ensure result set excludes posts assigned to specific authors.
Default:[] -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
menu_order– integer
Limit result set to posts with a specific menu_order value. -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title,menu_order -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
excerpt_length– integer
Override the default excerpt length. -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
author– array
Limit result set to posts assigned to specific authors.
Default:[] -
author_exclude– array
Ensure result set excludes posts assigned to specific authors.
Default:[] -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
menu_order– integer
Limit result set to posts with a specific menu_order value. -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title,menu_order -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
excerpt_length– integer
Override the default excerpt length. -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
author– array
Limit result set to posts assigned to specific authors.
Default:[] -
author_exclude– array
Ensure result set excludes posts assigned to specific authors.
Default:[] -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
menu_order– integer
Limit result set to posts with a specific menu_order value. -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title,menu_order -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
excerpt_length– integer
Override the default excerpt length. -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
author– array
Limit result set to posts assigned to specific authors.
Default:[] -
author_exclude– array
Ensure result set excludes posts assigned to specific authors.
Default:[] -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
menu_order– integer
Limit result set to posts with a specific menu_order value. -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title,menu_order -
parent– array
Limit result set to items with particular parent IDs.
Default:[] -
parent_exclude– array
Limit result set to all items except those of a particular parent ID.
Default:[] -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses -
tax_relation– string
Limit result set based on relationship between multiple taxonomies.
Enum:AND,OR -
wp2_collection– object|array
Limit result set to items with specific terms assigned in the wp2_collection taxonomy. -
wp2_collection_exclude– object|array
Limit result set to items except those with specific terms assigned in the wp2_collection taxonomy. -
wp2_status– object|array
Limit result set to items with specific terms assigned in the wp2_status taxonomy. -
wp2_status_exclude– object|array
Limit result set to items except those with specific terms assigned in the wp2_status taxonomy.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
excerpt_length– integer
Override the default excerpt length. -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg -
wp2_collection– array
The terms assigned to the post in the wp2_collection taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
wp2_status– array
The terms assigned to the post in the wp2_status taxonomy.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
author– array
Limit result set to posts assigned to specific authors.
Default:[] -
author_exclude– array
Ensure result set excludes posts assigned to specific authors.
Default:[] -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
menu_order– integer
Limit result set to posts with a specific menu_order value. -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title,menu_order -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
excerpt_length– integer
Override the default excerpt length. -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
author– array
Limit result set to posts assigned to specific authors.
Default:[] -
author_exclude– array
Ensure result set excludes posts assigned to specific authors.
Default:[] -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
menu_order– integer
Limit result set to posts with a specific menu_order value. -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title,menu_order -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
excerpt_length– integer
Override the default excerpt length. -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
author– integer
The ID for the author of the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
excerpt– object
The excerpt for the post. -
featured_media– integer
The ID of the featured media for the post.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
menu_order– integer
The order of the post in relation to other posts.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_items_permissions_check
Handler: method: WP_REST_Posts_Controller::get_items
Request Arguments (Query/Body):
-
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Default:10
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
after– string
Limit response to posts published after a given ISO8601 compliant date. -
modified_after– string
Limit response to posts modified after a given ISO8601 compliant date. -
before– string
Limit response to posts published before a given ISO8601 compliant date. -
modified_before– string
Limit response to posts modified before a given ISO8601 compliant date. -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
search_semantics– string
How to interpret the search input.
Enum:exact -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by post attribute.
Default:"date"
Enum:author,date,id,include,modified,parent,relevance,slug,include_slugs,title -
search_columns– array
Array of column names to be searched.
Default:[] -
slug– array
Limit result set to posts with one or more specific slugs. -
status– array
Limit result set to posts assigned one or more statuses.
Default:"publish"
Sanitization:method: WP_REST_Posts_Controller::sanitize_post_statuses
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::create_item_permissions_check
Handler: method: WP_REST_Posts_Controller::create_item
Request Arguments (Query/Body):
-
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Posts_Controller::get_item_permissions_check
Handler: method: WP_REST_Posts_Controller::get_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
password– string
The password for the post if it is password protected.
No schema defined.
POST
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PUT
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
PATCH
Permissions:
method: WP_REST_Posts_Controller::update_item_permissions_check
Handler: method: WP_REST_Posts_Controller::update_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
DELETE
Permissions:
method: WP_REST_Posts_Controller::delete_item_permissions_check
Handler: method: WP_REST_Posts_Controller::delete_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
id– integer
Unique identifier for the post. -
force– boolean
Whether to bypass Trash and force deletion.
Default:false
No schema defined.
GET
Permissions:
method: WP_REST_Autosaves_Controller::get_items_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_items
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
POST
Permissions:
method: WP_REST_Autosaves_Controller::create_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::create_item
URL Parameters:
id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
date– string|null
The date the post was published, in the site’s timezone.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
date_gmt– string|null
The date the post was published, as GMT.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
slug– string
An alphanumeric identifier for the post unique to its type.
Validation:function: rest_validate_request_arg
Sanitization:method: WP_REST_Posts_Controller::sanitize_slug -
status– string
A named status for the post.
Enum:publish,future,draft,pending,private,mapped,needs_update,wp_stream_enabled,wp_stream_disabled
Validation:method: WP_REST_Posts_Controller::check_status
Sanitization:function: rest_sanitize_request_arg -
password– string
A password to protect access to the content and excerpt.
Validation:function: rest_validate_request_arg
Sanitization:function: rest_sanitize_request_arg -
title– object
The title for the post. -
content– object
The content for the post. -
meta– object
Meta fields.
Validation:method: WP_REST_Post_Meta_Fields::check_meta_is_array -
template– string
The theme file to use to display the post.
Validation:method: WP_REST_Posts_Controller::check_template
Sanitization:function: rest_sanitize_request_arg
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Autosaves_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the autosave. -
id– integer
The ID for the autosave. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_items_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_items
URL Parameters:
parent: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key -
page– integer
Current page of the collection.
Default:1
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
per_page– integer
Maximum number of items to be returned in result set.
Validation:function: rest_validate_request_arg
Sanitization:function: absint -
search– string
Limit results to those matching a string.
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_text_field -
exclude– array
Ensure result set excludes specific IDs.
Default:[] -
include– array
Limit result set to specific IDs.
Default:[] -
offset– integer
Offset the result set by a specific number of items. -
order– string
Order sort attribute ascending or descending.
Default:"desc"
Enum:asc,desc -
orderby– string
Sort collection by object attribute.
Default:"date"
Enum:date,id,include,relevance,slug,include_slugs,title
No schema defined.
GET
Permissions:
method: WP_REST_Revisions_Controller::get_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::get_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
context– string
Scope under which the request is made; determines fields present in response.
Default:"view"
Enum:view,embed,edit
Validation:function: rest_validate_request_arg
Sanitization:function: sanitize_key
No schema defined.
DELETE
Permissions:
method: WP_REST_Revisions_Controller::delete_item_permissions_check
Handler: method: WP_REST_Revisions_Controller::delete_item
URL Parameters:
parent: Matches regex[\d]+id: Matches regex[\d]+
Request Arguments (Query/Body):
-
parent– integer
The ID for the parent of the revision. -
id– integer
Unique identifier for the revision. -
force– boolean
Required to be true, as revisions do not support trashing.
Default:false
No schema defined.