Skip to main content
NSEV never deletes packages on its own. Once a package reaches a final state it is stored indefinitely until you remove it explicitly. This page covers how to delete a single package, how to delete many at once, and how deleting differs from revoking a package.

Prerequisites

  • A valid access token or Basic Auth credentials - see Platform Access
  • Your tenant’s base URL set as BASE_URL
  • The Id of each package you want to delete
All examples use Bearer authentication. Replace the token and variable values with your own.

When a package can be deleted

A package can only be deleted when its status is draft or one of the final states finished, archived, rejected, or revoked. Deleting a package in any other state - for example a pending package that is still out for signature - returns 409 Conflict with the error code Package.InvalidStatus. If you need to remove a package that is still pending, revoke it first (see Deleting versus revoking below), then delete the revoked package.

Delete a single package

Send a DELETE to /packages/{packageId}. On success the call returns 204 No Content.

Delete packages in bulk

To remove many packages at once, POST their IDs to /packages/delete/bulk. The same status rule applies to every package in the list - only draft, finished, archived, rejected, or revoked packages can be deleted.
Bulk actions are processed asynchronously, so the call does not report per-package success immediately. Instead it returns a bulk action session identifier - a GUID - that you use to follow progress.

Polling the bulk action session

Pass the returned identifier to GET /packages/bulkactionsession/{bulkActionSessionId} to check whether processing has finished and how many packages succeeded or failed. Add ?includeDetails=true to get a per-package breakdown.
Status moves from Pending through Finishing to Finished; FinishedTime is only populated once the session reaches Finished. Poll until then. The Action field identifies the kind of bulk action the session ran - for a bulk delete it is DeletePackage.
Because each package in a bulk delete is processed independently, a session can finish with a mix of successes and failures - for example when some packages are in a deletable state and others are not. Always check Failed and the per-package Details rather than assuming the whole batch succeeded.

Audit trails

The audit trail - the human-readable and machine-readable record of a package’s events - is retrieved while the package still exists, through GET /packages/{packageId}/audittrail. Once a package is deleted it can still be fetched but will not contain stakeholders information, so if you need a full copy of the audit trail for your records, retrieve it before deleting the package. For a final package you can also request the audit-trail PDFs of many packages at once with POST /packages/audittrails/download/bulk, which returns a bulk action session you poll and then download as a .zip.

Deleting versus revoking

Deleting and revoking are different operations with different effects:
  • Revoking changes a package’s status to revoked. The package still exists; it has simply been withdrawn so stakeholders can no longer act on it. Revoking is a pendingrevoked status transition, done with PUT /packages/{packageId}/status (or, for many packages, POST /packages/status/bulk).
  • Deleting removes the package record from the database entirely. It is only allowed once the package is in draft or a final state - including revoked.
So to get rid of a package that is still out for signature, you revoke it first and then delete it. Revoking is the way to stop an in-flight package; deleting is the way to remove a finished or withdrawn one.
When revoking in bulk you can set SuppressNotifications to true so stakeholders are not emailed about the revocation. See Callbacks and redirects for how NSEV’s notifications work.

Next steps