Contents
On this page

Update Passage - Plugixa Exam

PUT /plugixa-exam/v1/passages/{id}

Change a passage’s text and playback rules. Only the fields you send are written.

Not reachable with an API token: since 1.4.1 a token request to this route answers 403 plugixa_exam_token_route. Call it as a signed-in WordPress user (from a script, with an Application Password) who holds the questions:edit permission.

Needs Plugixa Exam Pro, with the Passages app on in Plugixa Exam -> App Manager.

Request

PUT https://your-site.example/wp-json/plugixa-exam/v1/passages/7

Path parameters

Name Type Description
id integer The passage’s id

Request body

Content type: application/json

Field Type Required Description
title string No Must not be blank when sent.
body string No The text candidates read. HTML; tags outside the question-text allow-list are stripped.
transcript string No The recording’s transcript. HTML, filtered the same way.
audio_max_plays integer No How many times a candidate may play the recording, up to 99. 0 means no limit.
audio_seek boolean No Whether a candidate may skip around in the recording.
audio_pause boolean No Whether a candidate may pause a limited play. With no play limit, pausing is always allowed.
published boolean No Whether the passage is published.

A field you leave out keeps its stored value. The recording is changed through Upload Passage Audio and Remove Passage Audio, not here.

{
  "transcript": "<p>Speaker: For forty years the light on Gull Rock never failed.</p>",
  "audio_max_plays": 1
}

Responses

200 OK. data is the updated passage.

{
  "success": true,
  "data": {
    "id": 7,
    "title": "The lighthouse keeper",
    "body": "<p>For forty years the light on Gull Rock never failed.</p>",
    "transcript": "<p>Speaker: For forty years the light on Gull Rock never failed.</p>",
    "audio_name": "lighthouse-keeper.mp3",
    "audio_mime": "audio/mpeg",
    "audio_bytes": 2457600,
    "audio_seconds": 154,
    "audio_max_plays": 1,
    "audio_seek": false,
    "audio_pause": true,
    "published": true,
    "created_at": "2026-11-12 09:30:00",
    "modified_at": "2026-11-12 10:12:00",
    "created_by": 1,
    "modified_by": 1,
    "deleted_at": null,
    "question_count": 5,
    "has_audio": true,
    "audio_limit_mb": 64
  }
}
Field Type Meaning
data.audio_max_plays integer Play limit, 0 for no limit
data.audio_seek boolean Whether a candidate may skip around in the recording
data.audio_pause boolean Whether a candidate may pause a limited play
data.published boolean Whether the passage is published
data.modified_at string UTC datetime of the last change

The other fields are described under Get Passage.

Errors

Status Code When
404 plugixa_exam_not_found No passage with that id, or the passage is in the trash.
400 plugixa_exam_title_required title is sent blank.

Plus the errors every endpoint can return.

Examples

curl -s -X PUT "https://your-site.example/wp-json/plugixa-exam/v1/passages/7" \
  -u "$WP_USER:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"transcript":"<p>Speaker: For forty years the light on Gull Rock never failed.</p>","audio_max_plays":1}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-exam/v1/passages/7');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => [
        'Authorization: Basic ' . base64_encode(getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD')),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS     => json_encode([
        'transcript'      => '<p>Speaker: For forty years the light on Gull Rock never failed.</p>',
        'audio_max_plays' => 1,
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-exam/v1/passages/7', {
  method: 'PUT',
  headers: {
    'Authorization': 'Basic ' + btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    transcript: '<p>Speaker: For forty years the light on Gull Rock never failed.</p>',
    audio_max_plays: 1,
  }),
});
const { data } = await response.json();

Quick Links

Share