learndash/manage-question creates a new question in a quiz, or updates an existing one.
Unlike the other write abilities here, it goes through LearnDash’s own REST controller.
At a glance
| Ability | learndash/manage-question |
| Toolset | LearnDash — toolset/learndash |
| Group | LearnDash › Questions |
| Requires | AcrossAI Pro, plus LearnDash LMS active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Pro 0.9.16 and later |
Why the REST controller
A question is stored both as a post and as a ProQuiz record holding the answers, and only LearnDash’s controller keeps the two halves in sync.
Writing the post directly produces exactly the linked=false state the listing reports: a question that exists in wp-admin and cannot be answered.
The consequence is a dependency. This ability requires LearnDash’s REST API to be enabled, and says so plainly when it is not — rather than falling back to a direct write that would appear to succeed.
Answers are required on create. LearnDash rejects a question without them, which is correct: a question with no answers cannot be scored.
Give each answer as {answer, correct, points}. At least one should be correct for the single and multiple types — a question where nothing is correct is answerable and unscoreable.
Idempotent.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
action | string | Yes | create or update. |
quiz_id | integer | For create | The quiz to add the question to. |
question_id | integer | For update | Which question. |
title | string | For create | The question text. |
answers | array | For create | Each answer as {answer, correct, points}. |
settings | object | No | LearnDash question settings. |
What comes back
| Name | Type | What it is |
|---|---|---|
question | object | The question after the write, with its ProQuiz link. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Add a multiple-choice question to the quiz.
It resolves to one call:
{
"ability": "learndash/manage-question",
"parameters": {
"action": "create",
"quiz_id": 640,
"title": "Which shortcut opens the command palette?",
"answers": [
{ "answer": "Ctrl+K", "correct": true, "points": 1 },
{ "answer": "Ctrl+P", "correct": false, "points": 0 }
]
}
}Worth knowing
- Requires LearnDash’s REST API. It says so rather than writing half a question.
- Answers are required on create, and rightly so.
- A question with no correct answer is answerable and unscoreable.
- Idempotent.
Related abilities
- LearnDash List Questions — check the linked flags
- LearnDash Get Question — read the current answers
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category