---
title: Delete Invoices
slug: delete-invoices
docTags: 
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "Rx1ih-O0be2kk-ZWAZk7j",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "https://api.nue.io/billing/invoices",
    "servers": [
      {
        "url": "https://api.nue.io/billing/invoices",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/billing/invoices",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Delete Invoices",
    "description": "<p>Delete a list of canceled/draft invoices.</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": "<p>The request to delete a list of canceled/draft invoices.</p>",
          "customType": "DeleteInvoicesRequest",
          "schema": [
            {
              "name": "invoiceIds",
              "kind": "optional",
              "type": "array",
              "description": "<p>A set of Invoice IDs, mutually exclusive with the 'graphqlFilter' parameter.</p>",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "notifyCrm",
              "kind": "optional",
              "type": "boolean",
              "description": "<p>Indicates if the mapped invoice record in the connected CRM system (e.g., Salesforce) also needs to be deleted.</p>"
            },
            {
              "name": "notifyDebitMemoChangedToCrm",
              "kind": "optional",
              "type": "boolean",
              "description": "<p>Indicates if the mapped debit memo record in the connected CRM system (e.g., Salesforce) also needs to be updated.</p>"
            },
            {
              "name": "notifyPaymentChangedToCrm",
              "kind": "optional",
              "type": "boolean",
              "description": "<p>Indicates if the mapped payment record in the connected CRM system (e.g., Salesforce) also needs to be updated.</p>"
            },
            {
              "name": "graphqlFilter",
              "kind": "optional",
              "type": "string",
              "description": "Filter for invoices to be activated",
              "example": "{status: {_eq: \"Canceled\"}}"
            }
          ],
          "modelRef": "#/components/schemas/DeleteInvoicesRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "title",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "V9uvEkEYCQ__m5R9lZSHN",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url https://api.nue.io/billing/invoices \\\n     --header 'accept: application/json'"
        },
        {
          "id": "x595rOlcKSzvhSmMf_aqf",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.nue.io/billing/invoices\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "RsqAPOYzPj-0QgQqEr3DD",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/billing/invoices\")\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\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "7hFkJNQ3Wt2StcGUfYmWd",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/billing/invoices\"\n\npayload = {}\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": "V9uvEkEYCQ__m5R9lZSHN"
    },
    "results": {
      "languages": [
        {
          "id": "zPb8MPsBRAHuNGrFOPoej",
          "language": "200",
          "code": "// OK\n"
        },
        {
          "id": "Jimroa9TiMvLboRuW9Jpy",
          "language": "400",
          "code": "// Bad Request\n{\n  \"title\": \"\",\n  \"message\": \"\",\n  \"errorCode\": \"\"\n}"
        },
        {
          "id": "B1RjISPoT8WdeaMs78RTZ",
          "language": "404",
          "code": "// Not Found\n"
        }
      ],
      "selectedLanguageId": "zPb8MPsBRAHuNGrFOPoej"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}