Contents
Delete FAQ - Plugixa FAQ
DELETE /plugixa-faq/v1/faqs/{id}
Delete a FAQ for good. There is no trash.
Any signed-in user with the plugixa_faq_delete capability or WordPress’s edit_posts (Contributors and up, by default).
Note. FAQs nested under this one are not deleted: they move to the top level. Its custom field values, feedback votes and translations in other languages stay in the database. There is no existence check: an id that matches nothing still answers
200with the success message, and nothing changes.
Request
DELETE https://your-site.example/wp-json/plugixa-faq/v1/faqs/42
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The FAQ’s id |
Responses
200 OK.
{
"success": true,
"message": "FAQ deleted successfully",
"data": null
}
| Field | Type | Meaning |
|---|---|---|
message |
string |
A human-readable confirmation, translated to the site language |
Errors
| Status | Code | When |
|---|---|---|
500 |
rest_error |
The database refused the delete. |
Plus the errors every endpoint can return.
Examples
curl -s -X DELETE "https://your-site.example/wp-json/plugixa-faq/v1/faqs/42" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-faq/v1/faqs/42');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-faq/v1/faqs/42', {
method: 'DELETE',
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share