Contents
On this page

Delete Redirect - Plugixa Permalink Manager

DELETE /plugixa-permalink-manager/v1/redirects/{id}

Delete one redirect of any kind, including an old address of an item. Visitors to that address then get whatever WordPress serves there.

Needs Plugixa Permalink Manager Pro and the plugixa_permalink_manager_redirects capability.

Request

DELETE https://your-site.example/wp-json/plugixa-permalink-manager/v1/redirects/112

Path parameters

Name Type Description
id integer The redirect id

Responses

200 OK.

{
  "success": true,
  "data": {
    "deleted": 1
  }
}
Field Type Meaning
data.deleted integer Always 1

Errors

Status Code When
404 plugixa_permalink_manager_not_found No redirect with that id.

Plus the errors every endpoint can return.

Examples

curl -s -X DELETE "https://your-site.example/wp-json/plugixa-permalink-manager/v1/redirects/112" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-permalink-manager/v1/redirects/112');
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 auth = 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`);
const response = await fetch('https://your-site.example/wp-json/plugixa-permalink-manager/v1/redirects/112', {
  method: 'DELETE',
  headers: { 'Authorization': auth },
});
const { data } = await response.json();

Quick Links

Share