---
title: "Create a job to hard delete billing document files"
method: POST
path: "/v1/accounts/billing-documents/files/deletion-jobs"
tags: ["Billing Documents"]
---

# Create a job to hard delete billing document files

`POST /v1/accounts/billing-documents/files/deletion-jobs`

## Request

- Base URL: `https://rest.test.zuora.com`
- URL: `https://rest.test.zuora.com/v1/accounts/billing-documents/files/deletion-jobs`
- Auth: HTTP bearer

Creates an asynchronous job to permanently delete all billing document PDF files for specific accounts. 

After the deletion job is completed, all billing document PDF files are permanently deleted. To retrieve the status of a deletion job, call [Retrieve a job of hard deleting billing document files](https://developer.zuora.com/api-references/api/operation/GET_BillingDocumentFilesDeletionJob).

**Note**: This operation can be used only if you have the Billing user permission "Hard Delete Billing Document Files" enabled.

## Headers

- `Idempotency-Key` string
- `Accept-Encoding` string
- `Content-Encoding` string
- `Zuora-Track-Id` string
- `Zuora-Entity-Ids` string
- `Zuora-Org-Ids` string
- `Zuora-Version` string

## Request body

- POSTBillingDocumentFilesDeletionJobRequest
  - `accountIds` string[]: Container for the IDs of the accounts that you want to create the billing document files deletion job for. **Note**: When creating jobs to delete billing document PDF files, you must specify either set of `accountIds` or `accountKeys` in the request body.
  - `accountKeys` string[]: Container for the IDs and/or numbers of the accounts that you want to create the billing document files deletion job for. **Note**: When creating jobs to delete billing document PDF files, you must specify either set of `accountIds` or `accountKeys` in the request body.

## Response `200`

OK

- POSTBillingDocumentFilesDeletionJobResponse
  - `id` string: The unique ID of the billing document file deletion job.
  - `status` 'Pending': The status of the billing document file deletion job.
  - `success` boolean: Returns `true` if the request was processed successfully.

## Other responses

- `500`: Internal Server Error
- `4XX`: Request Errors

---

[API](https://skmtc.dev/zuora/apis/api-reference.md) · [All operations](https://skmtc.dev/zuora/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc.dev/zuora/apis/api-reference/revisions/2deecb0dd041?raw)
