---
title: Bulk Delete Objects
slug: bulk-delete-objects
docTags: 
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "AySfBBynm3mMwedm8T7vL",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "https://api.nue.io/api/objects/{objectName}List",
    "servers": [
      {
        "url": "https://api.nue.io/api/objects/{objectName}List",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/api/objects/{objectName}List",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Bulk Delete Objects",
    "description": "<p>Delete multiple records of the same object type in a single request. This permanently removes all specified records from Salesforce.</p>\n<p><strong>Supported Objects:</strong> Customer, Opportunity, Quote, QuoteLineItem, Order, and OrderProduct.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "objectName",
          "type": "string",
          "description": "<p>The object type to delete (append 'List' in the URL path, e.g., CustomerList)</p>",
          "enum": [
            "Customer",
            "Opportunity",
            "Quote",
            "QuoteLineItem",
            "Order",
            "OrderProduct"
          ]
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "example": "{\"idList\":[\"001D000000IRFmaIAH\",\"001D000000IRFmbIAH\",\"001D000000IRFmcIAH\"]}",
          "description": "List of record IDs to delete",
          "customType": "BulkDeleteRequest",
          "schema": [
            {
              "name": "idList",
              "kind": "required",
              "type": "array",
              "description": "Array of Salesforce record IDs to delete",
              "example": "[\"001D000000IRFmaIAH\",\"001D000000IRFmbIAH\",\"001D000000IRFmcIAH\"]",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            }
          ],
          "modelRef": "#/components/schemas/BulkDeleteRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "All objects deleted successfully",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "<p>Bad Request - Invalid request format or empty ID list</p>",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "<p>Unauthorized - Invalid or missing API key</p>",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "<p>Forbidden - Insufficient permissions</p>",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "2HqgVoKzucNcfhd0_bank",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url https://api.nue.io/api/objects/{objectName}List \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"idList\": []\n     }'"
        },
        {
          "id": "Wl_G0wY2T8wHkfQbwWNYl",
          "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   \"idList\": []\n});\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.nue.io/api/objects/{objectName}List\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "zaiBc55_nL2YPqLfrj83s",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/api/objects/{objectName}List\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"idList\": []\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Vf0pCUDtP96HyBlE0mFTT",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/api/objects/{objectName}List\"\n\npayload = json.dumps({\n   \"idList\": []\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "2HqgVoKzucNcfhd0_bank"
    },
    "results": {
      "languages": [
        {
          "id": "Ovf1GpygjcADJPvkp7t4h",
          "language": "200",
          "code": "// All objects deleted successfully\n"
        },
        {
          "id": "YAeQLmQEG9mu3YiCxNfZ-",
          "language": "400",
          "code": "// Bad Request - Invalid request format or empty ID list\n"
        },
        {
          "id": "ylnVkPX0eb0W2LzTaxVc7",
          "language": "401",
          "code": "// Unauthorized - Invalid or missing API key\n"
        },
        {
          "id": "4C83gBoTV5JtkvGtF9_gx",
          "language": "403",
          "code": "// Forbidden - Insufficient permissions\n"
        }
      ],
      "selectedLanguageId": "Ovf1GpygjcADJPvkp7t4h"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}