Publish a Node in Moderation

You can use this API request to change a node from in moderation to published.


You can use the following parameters in your publish a node in moderation request:

Other options: wrap, v1


Permissions & Notes:

  • You must have the Publish other's question permission under Moderation Roles in the Advanced Editor to publish any node in moderation.

    • If the node is your own, you must have the Publish questions permission under Standard Roles in the Advanced Editor.
  • We added this request in version 1.6.3.

Sample Request

A PUT publish a node in moderation request to publish a node (nodeId: 841) in moderation sent to using a human-readable Username/Password (answerhub/test123) would look like this:

-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT "" -v

Expected Responses

Successful Response:

  • HTTP Status 200 - OK
    "success": true,
    "result": {
        "publishAction": {
            "id": 1076,
            "ip": "",
            "user": {
                "id": 31,
                "username": "demo",
                "avatarUrl": ""
            "realUser": {
                "id": 108,
                "username": "admin",
                "avatarUrl": ""
            "actionDate": "Wed Feb 06 22:02:40 UTC 2019",
            "canceled": false,
            "extra": null,
            "private": false,
            "verb": "published",
            "node": {
                "id": 841,
                "type": "question"

Error Response:
If the node is already published or if you are not explicitly granted the required permissions, it returns HTML with permission denied.

<!DOCTYPE html>
<!-- -->
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en">
    <!--[if IE 7]>
    <html class="no-js lt-ie9 lt-ie8" lang="en">
        <!--[if IE 8]>
        <html class="no-js lt-ie9" lang="en">
            <!-- Consider adding a manifest.appcache: -->
            <!--[if gt IE 8]>
            <html class="no-js" lang="en" xmlns="">
                    <meta charset="utf-8" />
                    <!-- Use the .htaccess and remove these lines to avoid edge case issues. More info: -->
                    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
                    <meta name="description" content="Enterprise solution for all your Social Q&amp;A needs." />
                    <!-- Mobile viewport optimized: -->
                    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
                    <title>Unable to execute your request - apidocs</title>
                    <script type="text/javascript">
    var askFormURL = '/questions/ask.html';
    var logoutURL = '/users/logout.html';
    var voteUpJsonURL = '/commands/0/voteup.json';
    var voteDownJsonURL = '/commands/0/votedown.json';
    var getVotesJsonUrl = '/%7Bnode%7D/getVotes.json';
    var related_questions_url = '/search.json';
    var emailCheckerURL = '/users/temporaryLogin/dupsUserEmailCheck.json';

    var authorizedFileTypes = 'xml,gif,png,jpg,jpeg,zip,tar.gz,pdf,txt'.split(",");
    var authorizedImageTypes = 'gif,png,jpg,jpeg'.split(",");

    var flashMessages = [];

    var pageContext = {
        currentUser: {
            id: '',
            username: 'Anonymous',
            url: '#',
            avatar: '',
            reputation: '',
            follows: null,
            canCreateTopics: false,
        i18n: {
            confirm: "Are you sure?",
            yes: "Yes",
            no: "No",
            save: "Save Changes",
            cancel: "Cancel",
            close: "Close",
            edit: "Edit",
            insert: "Insert",
            upload: "Upload",
            download: "Download",
            choose: "Choose",
            deleted: "Deleted",
            ok: "Ok",
            by: "by",
            word: "word",
            words: "words",
            character: "character",
            characters: "characters",
            login: "Sign in",
            register: "Register",
            timeAgo: "{0} ago",
            timeAt: "at",
            day: "day",
            days: "days",
            hour: "hour",
            hours: "hours",
            minute: "minute",
            minutes: "minutes",
            second: "sec",
            seconds: "secs",
            justNow: "just now",
            retag: "retag",
            comment: "Comment",
            comments: "Comments",
            showOneComment: "
                        <i class='fa fa-comments-o' aria-hidden='true'></i> Show",
            hideOneComment: "
                        <i class='fa fa-comments' aria-hidden='true'></i> Hide",
            showNComments: "
                        <i class='fa fa-comments-o' aria-hidden='true'></i> Show",
            hideNComments: "
                        <i class='fa fa-comments' aria-hidden='true'></i> Hide",
            question: "question",
            questions: "Questions",
            answer: "Answer",
            answers: "Answers",
            posts: "Posts",
            wiki: "Wiki",
            reputation: "Reputation",
            unlike: "Unlike",
            like: "Like",
            likes: "Likes",
            favourite: "Save",
            unfavourite: "Saved",
            follow: "Follow",
            unfollow: "Unfollow",
            following: "Following",
            followers: "Followers",
            awarded: "Awarded",
            completedBy: "Recently completed by",
            joined: "Joined",
            authorizedTypes: "Allowed Upload Types",
            uploadDialog: {
                uploadFile: "Choose a file to upload",
                doUpload: "Upload",
                fileTooBig: "Your attachment must be $size or smaller.",
                invalidAttachmentType: "Your attachment must be one of: xml,gif,png,jpg,jpeg,zip,tar.gz,pdf,txt",
                invalidImageType: "Your image must be one of: gif,png,jpg,jpeg"
        }...deleted a lot of lines here because too long...
Click Try It! to start a request and see the response here!