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.

GET/api/v1/retention

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()
Response200
{}
Errors this can answer
StatusCodeWhen
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks retention.manage
429CS-API-0003Rate 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

Object

Returns

200 with a Object object.

PUT/api/v1/retention

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={},
)
Response200
{}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks retention.manage
413CS-API-0006The request body is over its limit
415CS-API-0007The body is not application/json
429CS-API-0003Rate 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.

GET/api/v1/retention/preview

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()
Response200
{}
Errors this can answer
StatusCodeWhen
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks retention.manage
429CS-API-0003Rate 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

  • idstringRequired

    Object id (UUIDv7)

    uuid

Returns

200 with a Object object.

PUT/api/v1/envelopes/{id}/legal-hold

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",
)
Response200
{}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks retention.manage
404CS-API-0002No such object, or one of another account (answered alike)
429CS-API-0003Rate 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

  • idstringRequired

    Object id (UUIDv7)

    uuid

Returns

200 with a Object object.

DELETE/api/v1/envelopes/{id}/legal-hold

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",
)
Response200
{}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks retention.manage
404CS-API-0002No such object, or one of another account (answered alike)
429CS-API-0003Rate 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

  • idstringRequired

    Object id (UUIDv7)

    uuid

Returns

202 Purged; the records follow by job with a Object object.

POST/api/v1/envelopes/{id}/purge

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",
)
Response202
{}
Errors this can answer
StatusCodeWhen
400 / 422CS-API-0001Malformed request: a parameter or member is missing, unknown or out of range; errors[] points at it
401CS-AUTH-0001No credential, or one that is expired or revoked (CS-AUTH-0002)
403CS-AUTH-0006The credential lacks retention.manage
404CS-API-0002No such object, or one of another account (answered alike)
429CS-API-0003Rate limited: wait for Retry-After seconds

Every error is an RFC 9457 problem with a stable code and a request_id; see Errors.