Posts
Remove a Single Post
Posts
Remove a Single Post
Delete a specific post from your WordPress site.
DELETE
/
wp
/
v2
/
posts
/
{id}
curl --request DELETE \
--url https://headlesswp.com/wp-json/wp/v2/posts/{id} \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data force=false
{
"date": "2023-11-07T05:31:56Z",
"date_gmt": "2023-11-07T05:31:56Z",
"guid": {
"raw": "<string>",
"rendered": "<string>"
},
"id": 123,
"link": "<string>",
"modified": "2023-11-07T05:31:56Z",
"modified_gmt": "2023-11-07T05:31:56Z",
"slug": "<string>",
"status": "publish",
"type": "<string>",
"password": "<string>",
"permalink_template": "<string>",
"generated_slug": "<string>",
"class_list": [
"<string>"
],
"title": {
"raw": "<string>",
"rendered": "<string>"
},
"content": {
"raw": "<string>",
"rendered": "<string>",
"block_version": 123,
"protected": true
},
"author": 123,
"excerpt": {
"raw": "<string>",
"rendered": "<string>",
"protected": true
},
"featured_media": 123,
"comment_status": "open",
"ping_status": "open",
"format": "standard",
"meta": {
"footnotes": ""
},
"sticky": true,
"template": "<string>",
"categories": [
123
],
"tags": [
123
]
}
Path Parameters
Unique identifier for the post.
Body
application/x-www-form-urlencoded
Response
200 - application/json
OK
The response is of type object
.
curl --request DELETE \
--url https://headlesswp.com/wp-json/wp/v2/posts/{id} \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data force=false
{
"date": "2023-11-07T05:31:56Z",
"date_gmt": "2023-11-07T05:31:56Z",
"guid": {
"raw": "<string>",
"rendered": "<string>"
},
"id": 123,
"link": "<string>",
"modified": "2023-11-07T05:31:56Z",
"modified_gmt": "2023-11-07T05:31:56Z",
"slug": "<string>",
"status": "publish",
"type": "<string>",
"password": "<string>",
"permalink_template": "<string>",
"generated_slug": "<string>",
"class_list": [
"<string>"
],
"title": {
"raw": "<string>",
"rendered": "<string>"
},
"content": {
"raw": "<string>",
"rendered": "<string>",
"block_version": 123,
"protected": true
},
"author": 123,
"excerpt": {
"raw": "<string>",
"rendered": "<string>",
"protected": true
},
"featured_media": 123,
"comment_status": "open",
"ping_status": "open",
"format": "standard",
"meta": {
"footnotes": ""
},
"sticky": true,
"template": "<string>",
"categories": [
123
],
"tags": [
123
]
}