---
title: Reject Pending Approvals
slug: reject-pending-approvals
docTags: 
createdAt: 2026-09-04T03:52:07.814Z
---

{
  "id": "Jy9GNoNJCc2YhC6p6h7BQ",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/cpq/approvals:reject",
    "servers": [
      {
        "url": "https://api.nue.io/cpq/approvals:reject",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/cpq/approvals:reject",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Reject Pending Approvals",
    "description": "<p>Rejects one or more pending approval records. Supply <code>reason</code> so the explanation travels with the decision and appears on the approval history.</p>\n<p>The response is the standard approvals envelope: <code>status</code> is <code>SUCCESS</code> or <code>FAILURE</code>, <code>data</code> carries the typed payload, and <code>warnings</code> and <code>errors</code> carry coded messages. Validation and engine failures are reported as coded errors on the envelope rather than as exceptions.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "RejectApprovalRequest",
          "schema": [
            {
              "name": "approvalIds",
              "kind": "required",
              "type": "array",
              "description": "Approval record IDs to reject.",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "reason",
              "kind": "optional",
              "type": "string",
              "description": "Rejection reason recorded on the approval."
            },
            {
              "name": "actor",
              "kind": "optional",
              "type": "string",
              "description": "Salesforce User ID to act on behalf of."
            },
            {
              "name": "source",
              "kind": "optional",
              "type": "string",
              "description": "<p>Channel the action came from. One of <code>UI</code>, <code>Email</code>, <code>API</code>, or <code>Flow</code>; recorded on the approval for audit. Defaults to <code>API</code> when omitted.</p>"
            }
          ],
          "modelRef": "#/components/schemas/RejectApprovalRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Approvals rejected.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Envelope returned by the approval action verbs.",
            "customType": "ApprovalActionResponse",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "<p><code>SUCCESS</code> or <code>FAILURE</code>.</p>"
              },
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ApprovalActionData",
                "customType": "ApprovalActionData",
                "schema": [
                  {
                    "name": "requestId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "recordId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "isLocked",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  },
                  {
                    "name": "approvers",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/ApprovalActionItem",
                    "customType": "ApprovalActionItem[]",
                    "schema": [
                      {
                        "name": "approvalId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "stepName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "stepStatus",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "approverUserId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "originalApproverUserId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "reassignedFromApprovalId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "rejectionMessage",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  },
                  {
                    "name": "approvals",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/ApprovalActionItem",
                    "customType": "ApprovalActionItem[]",
                    "schema": [
                      {
                        "name": "approvalId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "stepName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "stepStatus",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "approverUserId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "originalApproverUserId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "reassignedFromApprovalId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "rejectionMessage",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  }
                ]
              },
              {
                "name": "warnings",
                "kind": "optional",
                "type": "array",
                "description": "<p>A coded message returned on the envelope. Validation and engine failures are reported here rather than thrown, so a FAILURE response is still a well-formed body.</p>",
                "modelRef": "#/components/schemas/ApprovalMessage",
                "customType": "ApprovalMessage[]",
                "schema": [
                  {
                    "name": "severity",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p><code>ERROR</code>, <code>WARNING</code>, or <code>INFO</code>.</p>"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Stable machine-readable code, e.g. <code>INVALID_PARAMETER</code>, <code>MISSING_PARAMETER</code>, <code>RECORD_NOT_FOUND</code>.</p>"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable explanation.</p>"
                  }
                ]
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "description": "<p>A coded message returned on the envelope. Validation and engine failures are reported here rather than thrown, so a FAILURE response is still a well-formed body.</p>",
                "modelRef": "#/components/schemas/ApprovalMessage",
                "customType": "ApprovalMessage[]",
                "schema": [
                  {
                    "name": "severity",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p><code>ERROR</code>, <code>WARNING</code>, or <code>INFO</code>.</p>"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Stable machine-readable code, e.g. <code>INVALID_PARAMETER</code>, <code>MISSING_PARAMETER</code>, <code>RECORD_NOT_FOUND</code>.</p>"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable explanation.</p>"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ApprovalActionResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Missing or invalid parameter.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Envelope returned by the approval action verbs.",
            "customType": "ApprovalActionResponse",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "<p><code>SUCCESS</code> or <code>FAILURE</code>.</p>"
              },
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ApprovalActionData",
                "customType": "ApprovalActionData",
                "schema": [
                  {
                    "name": "requestId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "recordId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "isLocked",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  },
                  {
                    "name": "approvers",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/ApprovalActionItem",
                    "customType": "ApprovalActionItem[]",
                    "schema": [
                      {
                        "name": "approvalId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "stepName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "stepStatus",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "approverUserId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "originalApproverUserId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "reassignedFromApprovalId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "rejectionMessage",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  },
                  {
                    "name": "approvals",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/ApprovalActionItem",
                    "customType": "ApprovalActionItem[]",
                    "schema": [
                      {
                        "name": "approvalId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "stepName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "stepStatus",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "approverUserId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "originalApproverUserId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "reassignedFromApprovalId",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "rejectionMessage",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  }
                ]
              },
              {
                "name": "warnings",
                "kind": "optional",
                "type": "array",
                "description": "<p>A coded message returned on the envelope. Validation and engine failures are reported here rather than thrown, so a FAILURE response is still a well-formed body.</p>",
                "modelRef": "#/components/schemas/ApprovalMessage",
                "customType": "ApprovalMessage[]",
                "schema": [
                  {
                    "name": "severity",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p><code>ERROR</code>, <code>WARNING</code>, or <code>INFO</code>.</p>"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Stable machine-readable code, e.g. <code>INVALID_PARAMETER</code>, <code>MISSING_PARAMETER</code>, <code>RECORD_NOT_FOUND</code>.</p>"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable explanation.</p>"
                  }
                ]
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "description": "<p>A coded message returned on the envelope. Validation and engine failures are reported here rather than thrown, so a FAILURE response is still a well-formed body.</p>",
                "modelRef": "#/components/schemas/ApprovalMessage",
                "customType": "ApprovalMessage[]",
                "schema": [
                  {
                    "name": "severity",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p><code>ERROR</code>, <code>WARNING</code>, or <code>INFO</code>.</p>"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Stable machine-readable code, e.g. <code>INVALID_PARAMETER</code>, <code>MISSING_PARAMETER</code>, <code>RECORD_NOT_FOUND</code>.</p>"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable explanation.</p>"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ApprovalActionResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Authentication failed or the Salesforce session is unavailable.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Record not found.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "429",
        "description": "Salesforce limit exceeded.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Unexpected or upstream failure.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "k9u8scTjOD66ookZBTzZx",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/cpq/approvals:reject \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"approvalIds\": []\n     }'"
        },
        {
          "id": "25yBQwZF_gCFbaQBhYwHI",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"approvalIds\": []\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.nue.io/cpq/approvals:reject\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "32Yl6aFTa4VJrCHWQn_FS",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/cpq/approvals:reject\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"approvalIds\": []\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "2WJxt2RhueeAd7iPD4OEe",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/cpq/approvals:reject\"\n\npayload = json.dumps({\n   \"approvalIds\": []\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "k9u8scTjOD66ookZBTzZx"
    },
    "results": {
      "languages": [
        {
          "id": "qQJmIZ49YpfO104y-w2qL",
          "language": "200",
          "code": "// Approvals rejected.\n{\n  \"status\": \"\",\n  \"data\": {\n    \"requestId\": \"\",\n    \"recordId\": \"\",\n    \"status\": \"\",\n    \"isLocked\": false,\n    \"approvers\": [\n      {\n        \"approvalId\": \"\",\n        \"stepName\": \"\",\n        \"stepStatus\": \"\",\n        \"approverUserId\": \"\",\n        \"originalApproverUserId\": \"\",\n        \"reassignedFromApprovalId\": \"\",\n        \"rejectionMessage\": \"\"\n      }\n    ],\n    \"approvals\": [\n      {\n        \"approvalId\": \"\",\n        \"stepName\": \"\",\n        \"stepStatus\": \"\",\n        \"approverUserId\": \"\",\n        \"originalApproverUserId\": \"\",\n        \"reassignedFromApprovalId\": \"\",\n        \"rejectionMessage\": \"\"\n      }\n    ]\n  },\n  \"warnings\": [\n    {\n      \"severity\": \"\",\n      \"code\": \"\",\n      \"message\": \"\"\n    }\n  ],\n  \"errors\": [\n    {\n      \"severity\": \"\",\n      \"code\": \"\",\n      \"message\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "nPyAuG5FLds5cgVSD576j",
          "language": "400",
          "code": "// Missing or invalid parameter.\n{\n  \"status\": \"\",\n  \"data\": {\n    \"requestId\": \"\",\n    \"recordId\": \"\",\n    \"status\": \"\",\n    \"isLocked\": false,\n    \"approvers\": [\n      {\n        \"approvalId\": \"\",\n        \"stepName\": \"\",\n        \"stepStatus\": \"\",\n        \"approverUserId\": \"\",\n        \"originalApproverUserId\": \"\",\n        \"reassignedFromApprovalId\": \"\",\n        \"rejectionMessage\": \"\"\n      }\n    ],\n    \"approvals\": [\n      {\n        \"approvalId\": \"\",\n        \"stepName\": \"\",\n        \"stepStatus\": \"\",\n        \"approverUserId\": \"\",\n        \"originalApproverUserId\": \"\",\n        \"reassignedFromApprovalId\": \"\",\n        \"rejectionMessage\": \"\"\n      }\n    ]\n  },\n  \"warnings\": [\n    {\n      \"severity\": \"\",\n      \"code\": \"\",\n      \"message\": \"\"\n    }\n  ],\n  \"errors\": [\n    {\n      \"severity\": \"\",\n      \"code\": \"\",\n      \"message\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "qT9RhtBD64zm263Cd5Fgq",
          "language": "401",
          "code": "// Authentication failed or the Salesforce session is unavailable.\n"
        },
        {
          "id": "aXCz-gWFxj7uHocR1ov-P",
          "language": "404",
          "code": "// Record not found.\n"
        },
        {
          "id": "QUmBX4voC6JtylD45hKBh",
          "language": "429",
          "code": "// Salesforce limit exceeded.\n"
        },
        {
          "id": "bk0txb2vzMNwPueCYyRP4",
          "language": "500",
          "code": "// Unexpected or upstream failure.\n"
        }
      ],
      "selectedLanguageId": "qQJmIZ49YpfO104y-w2qL"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}