Prerequisites
- A valid access token or Basic Auth credentials - see Platform Access
- Your tenant’s base URL set as
BASE_URL - The
Idof each package you want to delete
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 isdraft 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 aDELETE 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.
Polling the bulk action session
Pass the returned identifier toGET /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, throughGET /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 apending→revokedstatus transition, done withPUT /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
draftor a final state - includingrevoked.
Next steps
- Create and activate packages in Send a document for signing
- Understand package statuses and the object model in The package model
- Review Best Practices for error handling, pagination, and security