Contents
On this page

Regenerate Addresses - Plugixa Permalink Manager

POST /plugixa-permalink-manager/v1/tools/regenerate

Start a job that gives every published or private item of one content type a fresh address: the one its pattern produces, or its WordPress address.

Needs the plugixa_permalink_manager_tools capability.

Every tool is a preview unless you send "dry_run": false. Leaving dry_run out previews.

Starting it returns a job and changes nothing yet: call Tick Job until its status is no longer queued or running. See jobs.

Request

POST https://your-site.example/wp-json/plugixa-permalink-manager/v1/tools/regenerate

Request body

Content type: application/json

Field Type Required Description
dry_run boolean No Defaults to true: list what would change, change nothing.
kind string No post (the default) or term.
type string Yes A managed post type or taxonomy.
mode string No default (the address the pattern produces, the default) or native (the WordPress address).
include_manual boolean No Also change addresses typed by hand. Defaults to false.

Always left alone: items in Keep my URI and skip bulk tools (-2) or Disable the custom permalink (2) mode, and excluded items. Every changed address keeps its old one as a redirect, and the run can be undone. See Regenerate.

{
  "dry_run": false,
  "kind": "post",
  "type": "product",
  "mode": "default"
}

Responses

201 Created. data is the new job.

{
  "success": true,
  "data": {
    "id": 58,
    "type": "regenerate",
    "status": "queued",
    "dry_run": false,
    "params": {
      "kind": "post",
      "type": "product",
      "mode": "default",
      "include_manual": false
    },
    "total": 18,
    "processed": 0,
    "changed": 0,
    "skipped": 0,
    "failed": 0,
    "samples": [],
    "undoable": false,
    "last_error": null,
    "created_at": "2026-11-12 09:30:00",
    "finished_at": null
  }
}
Field Type Meaning
data.id integer The job id: tick it with Tick Job
data.type string What the job does
data.status string queued, running, done, failed or cancelled
data.dry_run boolean true for a preview that changes nothing
data.params object The parameters as the job will use them, after cleaning
data.total integer Items the job expects to go through, counted when it was created
data.processed integer Items gone through so far
data.changed integer Items changed, or that a preview would change
data.skipped integer Items left alone
data.failed integer Items that could not be changed
data.samples array Up to 500 changed or failed items: status, kind, id, title, before, after and message
data.undoable boolean Whether Undo Job will accept it
data.last_error string|null Why a failed job stopped
data.created_at string UTC datetime
data.finished_at string|null UTC datetime, once it has stopped

Errors

Status Code When
422 plugixa_permalink_manager_invalid type is missing or not a content type the plugin manages.
500 plugixa_permalink_manager_db_error The job could not be created.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-site.example/wp-json/plugixa-permalink-manager/v1/tools/regenerate" \
  -u "admin:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"dry_run":false,"kind":"post","type":"product","mode":"default"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-permalink-manager/v1/tools/regenerate');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode([
        'dry_run' => false,
        'kind'    => 'post',
        'type'    => 'product',
        'mode'    => 'default',
    ]),
]);
$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/tools/regenerate', {
  method: 'POST',
  headers: {
    'Authorization': auth,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ dry_run: false, kind: 'post', type: 'product', mode: 'default' }),
});
const { data } = await response.json();

Quick Links

Share