Outcome
Read the retained audit certificate PDF only after the exact envelope is completed and its certificate artifact is ready. The SDK returns contentType, contentLength and contentBase64.
Before you start
- Verify the environment, authenticated identity and specifically approved organization context.
- The published application permission is workspace:read. Resolve and bind the exact canonical Sign workspace. A supplied id or organization membership alone grants no workspace access.
- Session callers require read workspace access. API-key resource binding is verified by Auth; never treat a caller-supplied header as an independent grant.
Discover the target
topolo whoami --json
topolo actions get app_topolo_sign.envelopes.audit_certificate.pdf.get --detail --json
topolo resources topolo-sign --json
topolo workspaces list topolo-sign --json
- Set SIGN_WORKSPACE_ID to the exact granted workspace returned by discovery.
- Resolve envelopeId through envelopes.list/get or retain the exact creation response.
Request
GET /api/envelopes/{envelopeId}/audit-certificate/pdf
Inspect and test this action. Save the reviewed input as payload.json. Supply resource context separately.
Input fields
| Field | Required | Meaning | Constraints |
|---|---|---|---|
envelopeId | Required | Exact envelope.id returned by creation or envelopes.list/get in this workspace. | {"minLength":1} |
Read the complete input schema.
Effects
- Reads retained bytes with existing workspace:read authorization. No agreement, consent or recipient data is changed.
- The server verifies stored object SHA-256 before returning bytes. Artifact download records an existing operational download event.
Interpret the response
Binary transport returns no resource identifier. Retain the authorized input documentId or envelopeId; decoded bytes are the downloaded artifact.
Read envelopes.audit_certificate.get with the retained envelopeId in the same granted workspace. Base64-decode contentBase64 and compare its byte length with contentLength. SHA-256 the decoded bytes and compare with artifacts[].sha256 for kind certificate_pdf from the authorized metadata read. Never hash the Base64 string. The SDK binary projection contains bytes and type, not a new document id or filename. Retain the input identifier and choose a local filename deliberately.
Inspect the success schema. CLI/MCP add their transport envelope; --detail requests the full CLI result. HTTP 204 contains no JSON payload.
Worked examples
Captured from the exported Sign Worker with the existing SQLite-backed D1 harness applying all core, envelope and audit migrations to one local database, in-memory R2 and synthetic Auth/workspace/archive/Notify transports. These examples prove local validation, persistence and artifact production. They do not prove separate deployed D1 topology, real recipient consent, provider delivery or a live signed agreement. All identities, signing links and documents are synthetic; replace identifiers through authorized discovery and never execute a fixture against a live organization. Binary download examples use the released SDK binary projection; tests Base64-decode and compare original bytes, lengths and server SHA-256 headers.
Refused request · HTTP 409
Input · payload.json:
{
"envelopeId": "b0db0353-6d5a-4a9b-b3f4-85f439ec4953"
}
CLI:
topolo actions validate app_topolo_sign.envelopes.audit_certificate.pdf.get --data @payload.json --json
topolo actions plan app_topolo_sign.envelopes.audit_certificate.pdf.get --resource-type workspace --resource-id "$SIGN_WORKSPACE_ID" --data @payload.json --json
Captured exported Worker response · HTTP 409:
{
"error": "audit_certificate_not_ready"
}
HTTP 409. Resolve the exact refusal before retrying. This request is not a successful workflow.
Supported request · Read the retained certificate PDF and verify its SHA-256
Input · payload.json:
{
"envelopeId": "b0db0353-6d5a-4a9b-b3f4-85f439ec4953"
}
CLI:
topolo actions validate app_topolo_sign.envelopes.audit_certificate.pdf.get --data @payload.json --json
topolo actions plan app_topolo_sign.envelopes.audit_certificate.pdf.get --resource-type workspace --resource-id "$SIGN_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_sign.envelopes.audit_certificate.pdf.get --resource-type workspace --resource-id "$SIGN_WORKSPACE_ID" --data @payload.json --detail --json
MCP tool and arguments:
{
"tool": "topolo_read_action",
"arguments": {
"actionId": "app_topolo_sign.envelopes.audit_certificate.pdf.get",
"input": {
"envelopeId": "b0db0353-6d5a-4a9b-b3f4-85f439ec4953"
},
"resourceType": "workspace",
"resourceId": "<exact granted id from discovery>",
"detail": true
}
}
Captured canonical SDK binary projection of the exported Worker response · HTTP 200:
{
"contentType": "application/pdf",
"contentLength": 4503,
"contentBase64": "JVBERi0xLjcKJYGBgYEKCjEgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9LaWRzIFsgNyAwIFIgXQovQ291bnQgMQo+PgplbmRvYmoKCjIgMCBvYmoKPDwKL1R5cGUgL0NhdGFsb2cKL1BhZ2VzIDEgMCBSCj4+CmVuZG9iagoKMyAwIG9iago8PAovUHJvZHVjZXIgPEZFRkYwMDU0MDA2RjAwNzAwMDZGM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P4kKWgYkwVk9bXFaszSHx+BIHQ9CHf7tdqZM7N+BVJZkdp8YeTpUVYoHwEg7t85/yoE5EJ57C+ki1eMxmGGjjoEXeMkaM/3unod84PeHmM9kUFg3fgAI8FJCWZ8C4d2F6D7lItzZev1lc8/W/fL/2SCmVuZHN0cmVhbQplbmRvYmoKCnhyZWYKMCA5CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxNiAwMDAwMCBuIAowMDAwMDAwMDc2IDAwMDAwIG4gCjAwMDAwMDAxMjYgMDAwMDAgbiAKMDAwMDAwMTI4MyAwMDAwMCBuIAowMDAwMDAxMzgxIDAwMDAwIG4gCjAwMDAwMDE0ODQgMDAwMDAgbiAKMDAwMDAwMTU4NyAwMDAwMCBuIAowMDAwMDAyNzI3IDAwMDAwIG4gCgp0cmFpbGVyCjw8Ci9TaXplIDkKL1Jvb3QgMiAwIFIKL0luZm8gMyAwIFIKPj4KCnN0YXJ0eHJlZgo0MjQ2CiUlRU9G"
}
HTTP 200. Read envelopes.audit_certificate.get with the retained envelopeId in the same granted workspace. Base64-decode contentBase64 and compare its byte length with contentLength. SHA-256 the decoded bytes and compare with artifacts[].sha256 for kind certificate_pdf from the authorized metadata read. Never hash the Base64 string. The SDK binary projection contains bytes and type, not a new document id or filename. Retain the input identifier and choose a local filename deliberately.
Refused request · HTTP 401
Input · payload.json:
{
"envelopeId": "ed22fca5-d5f0-4392-8e71-96e247bf3875"
}
CLI:
topolo actions validate app_topolo_sign.envelopes.audit_certificate.pdf.get --data @payload.json --json
topolo actions plan app_topolo_sign.envelopes.audit_certificate.pdf.get --resource-type workspace --resource-id "$SIGN_WORKSPACE_ID" --data @payload.json --json
Captured exported Worker response · HTTP 401:
{
"error": "Token validation failed"
}
HTTP 401. Resolve the exact refusal before retrying. This request is not a successful workflow.
Refused request · HTTP 403
Input · payload.json:
{
"envelopeId": "synthetic-unresolved-fixture"
}
CLI:
topolo actions validate app_topolo_sign.envelopes.audit_certificate.pdf.get --data @payload.json --json
topolo actions plan app_topolo_sign.envelopes.audit_certificate.pdf.get --resource-type workspace --resource-id "$SIGN_WORKSPACE_ID" --data @payload.json --json
Captured exported Worker response · HTTP 403:
{
"error": "You do not have access to this workspace",
"code": "workspace_forbidden"
}
HTTP 403. Resolve the exact refusal before retrying. This request is not a successful workflow.
Verify the result
- Read envelopes.audit_certificate.get with the retained envelopeId in the same granted workspace.
- Base64-decode contentBase64 and compare its byte length with contentLength. SHA-256 the decoded bytes and compare with artifacts[].sha256 for kind certificate_pdf from the authorized metadata read. Never hash the Base64 string.
- The SDK binary projection contains bytes and type, not a new document id or filename. Retain the input identifier and choose a local filename deliberately.
Errors and recovery
envelope_not_found(HTTP 404): Discover the exact retained identifier in this authorized workspace; do not substitute an identifier from another workspace.artifact_integrity_failed(HTTP 500): Stored artifact bytes do not match the retained SHA-256. Preserve the envelope, expected hash and request id and report the integrity incident; do not substitute a new hash.audit_certificate_not_ready(HTTP 409): Read the retained envelope and restore the complete intended recipient list through an authorized draft update before attempting send.auth_error(HTTP 401): Reauthenticate in the same approved context before retrying.workspace_forbidden(HTTP 403): Discover the actual workspace grant and obtain the documented required access; do not retry with a guessed workspace or broader organization.
Some existing refusals return a human message as error rather than a stable code; preserve the actual response, status and request id. Platform validation, authentication and resource checks can refuse before the handler.
Recovery boundary
A download changes no agreement. Resolve the actual grant and artifact readiness, then repeat the same read. Never recreate or re-sign an agreement to make a download succeed.
Related actions
- Get Sign audit certificate: Get the immutable audit certificate issued when an envelope completed: signer identities, capacities, consent and evidence hashes, the source and completed document SHA-256 and a hash chain over the audit trail, plus the certificate's own hash.
Evidence
Captured from the exported Sign Worker with the existing SQLite-backed D1 harness applying all core, envelope and audit migrations to one local database, in-memory R2 and synthetic Auth/workspace/archive/Notify transports. These examples prove local validation, persistence and artifact production. They do not prove separate deployed D1 topology, real recipient consent, provider delivery or a live signed agreement. All identities, signing links and documents are synthetic; replace identifiers through authorized discovery and never execute a fixture against a live organization. Binary download examples use the released SDK binary projection; tests Base64-decode and compare original bytes, lengths and server SHA-256 headers.