Administration
Retention and legal hold
Retention rules that purge ended envelopes, their preview, legal holds and purging one envelope.
Get retention
GET/api/v1/retention
The account's retention rules
{keep_days: {draft, ended, completed, sessions}, max_keep_days}: days a record of each class is kept after its last change (completion, for completed envelopes), or null to keep it for ever (the default).
AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session
Permissionretention.manage · OAuth scope admin:account
Returns
200 with a Object object.
curl
curl https://sign.example.com/api/v1/retention \
-H "Authorization: Bearer $OPENSEAL_API_KEY"TypeScript
import { OpenSeal } from "@openseal/sdk";
const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const data = await os.getRetention();Python
import os
from openseal import OpenSeal
client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
data = client.get_retention(){}Errors this can answer
| Status | Code | When |
|---|---|---|
| 401 | CS-AUTH-0001 | No credential, or one that is expired or revoked (CS-AUTH-0002) |
| 403 | CS-AUTH-0006 | The credential lacks retention.manage |
| 429 | CS-API-0003 | Rate limited: wait for Retry-After seconds |
Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.
Set retention
PUT/api/v1/retention
Set or remove retention rules
{keep_days: {class: days | null}}, days 1 to 36500; classes left out are unchanged. After a recent re-authentication. Each change is the admin event retention.rule_set. The daily retention job then purges what a rule expires, never an envelope under legal hold or in flight.
AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session
Permissionretention.manage · OAuth scope admin:account
Request body
Content type application/json · required
Returns
200 with a Object object.
curl
curl -X PUT https://sign.example.com/api/v1/retention \
-H "Authorization: Bearer $OPENSEAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'TypeScript
import { OpenSeal } from "@openseal/sdk";
const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.setRetention({
body: {},
});Python
import os
from openseal import OpenSeal
client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.set_retention(
body={},
){}Errors this can answer
| Status | Code | When |
|---|---|---|
| 400 / 422 | CS-API-0001 | Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it |
| 401 | CS-AUTH-0001 | No credential, or one that is expired or revoked (CS-AUTH-0002) |
| 403 | CS-AUTH-0006 | The credential lacks retention.manage |
| 413 | CS-API-0006 | The request body is over its limit |
| 415 | CS-API-0007 | The body is not application/json |
| 429 | CS-API-0003 | Rate limited: wait for Retry-After seconds |
Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.
Preview retention
GET/api/v1/retention/preview
Dry run of the retention job
What the job would delete now, changing nothing: {at, counts {draft, ended, completed}, sessions, held, envelopes [{id, class, since}]} (at most 100 listed, oldest first; held counts expired envelopes a legal hold keeps).
AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session
Permissionretention.manage · OAuth scope admin:account
Returns
200 with a Object object.
curl
curl https://sign.example.com/api/v1/retention/preview \
-H "Authorization: Bearer $OPENSEAL_API_KEY"TypeScript
import { OpenSeal } from "@openseal/sdk";
const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const data = await os.previewRetention();Python
import os
from openseal import OpenSeal
client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
data = client.preview_retention(){}Errors this can answer
| Status | Code | When |
|---|---|---|
| 401 | CS-AUTH-0001 | No credential, or one that is expired or revoked (CS-AUTH-0002) |
| 403 | CS-AUTH-0006 | The credential lacks retention.manage |
| 429 | CS-API-0003 | Rate limited: wait for Retry-After seconds |
Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.
Set legal hold
PUT/api/v1/envelopes/{id}/legal-hold
Place an envelope under legal hold
No retention rule or purge request removes it until released. Admin event envelope.legal_hold_set. Answers {envelope_id, legal_hold, since}.
AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session
Permissionretention.manage · OAuth scope admin:account
Path parameters
Object id (UUIDv7)
Returns
200 with a Object object.
curl
curl -X PUT https://sign.example.com/api/v1/envelopes/01934c50-3ca6-7776-81e5-c4aaecfe9962/legal-hold \
-H "Authorization: Bearer $OPENSEAL_API_KEY"TypeScript
import { OpenSeal } from "@openseal/sdk";
const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.setLegalHold({
id: "01934c50-3ca6-7776-81e5-c4aaecfe9962",
});Python
import os
from openseal import OpenSeal
client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.set_legal_hold(
id="01934c50-3ca6-7776-81e5-c4aaecfe9962",
){}Errors this can answer
| Status | Code | When |
|---|---|---|
| 400 / 422 | CS-API-0001 | Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it |
| 401 | CS-AUTH-0001 | No credential, or one that is expired or revoked (CS-AUTH-0002) |
| 403 | CS-AUTH-0006 | The credential lacks retention.manage |
| 404 | CS-API-0002 | No such object, or one of another account (answered alike) |
| 429 | CS-API-0003 | Rate limited: wait for Retry-After seconds |
Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.
Release legal hold
DELETE/api/v1/envelopes/{id}/legal-hold
Release an envelope's legal hold
Admin event envelope.legal_hold_released. Answers as PUT.
AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session
Permissionretention.manage · OAuth scope admin:account
Path parameters
Object id (UUIDv7)
Returns
200 with a Object object.
curl
curl -X DELETE https://sign.example.com/api/v1/envelopes/01934c50-3ca6-7776-81e5-c4aaecfe9962/legal-hold \
-H "Authorization: Bearer $OPENSEAL_API_KEY"TypeScript
import { OpenSeal } from "@openseal/sdk";
const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.releaseLegalHold({
id: "01934c50-3ca6-7776-81e5-c4aaecfe9962",
});Python
import os
from openseal import OpenSeal
client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.release_legal_hold(
id="01934c50-3ca6-7776-81e5-c4aaecfe9962",
){}Errors this can answer
| Status | Code | When |
|---|---|---|
| 400 / 422 | CS-API-0001 | Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it |
| 401 | CS-AUTH-0001 | No credential, or one that is expired or revoked (CS-AUTH-0002) |
| 403 | CS-AUTH-0006 | The credential lacks retention.manage |
| 404 | CS-API-0002 | No such object, or one of another account (answered alike) |
| 429 | CS-API-0003 | Rate limited: wait for Retry-After seconds |
Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.
Purge envelope
POST/api/v1/envelopes/{id}/purge
Purge an envelope now, at the controller's request
For an envelope that completed, ended or was never sent, after a recent re-authentication: appends envelope.purged with the policy request and queues the purge of its documents and personal data; its audit chain and a tombstone stay. 409 CS-API-0019 under legal hold; 409 CS-WF-0001 in flight or already purged. How a signer's erasure request is carried out by the account that holds their envelope.
AuthAPI key or OAuth access token (Authorization: Bearer), or a staff session
Permissionretention.manage · OAuth scope admin:account
Path parameters
Object id (UUIDv7)
Returns
202 Purged; the records follow by job with a Object object.
curl
curl -X POST https://sign.example.com/api/v1/envelopes/01934c50-3ca6-7776-81e5-c4aaecfe9962/purge \
-H "Authorization: Bearer $OPENSEAL_API_KEY"TypeScript
import { OpenSeal } from "@openseal/sdk";
const os = new OpenSeal({ baseUrl: "https://sign.example.com", apiKey: process.env.OPENSEAL_API_KEY });
const result = await os.purgeEnvelope({
id: "01934c50-3ca6-7776-81e5-c4aaecfe9962",
});Python
import os
from openseal import OpenSeal
client = OpenSeal("https://sign.example.com", api_key=os.environ["OPENSEAL_API_KEY"])
result = client.purge_envelope(
id="01934c50-3ca6-7776-81e5-c4aaecfe9962",
){}Errors this can answer
| Status | Code | When |
|---|---|---|
| 400 / 422 | CS-API-0001 | Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it |
| 401 | CS-AUTH-0001 | No credential, or one that is expired or revoked (CS-AUTH-0002) |
| 403 | CS-AUTH-0006 | The credential lacks retention.manage |
| 404 | CS-API-0002 | No such object, or one of another account (answered alike) |
| 429 | CS-API-0003 | Rate limited: wait for Retry-After seconds |
Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.