Topolo Docs Topolo Platform
Open workspace

Export Sign organization data

Export every Sign record and signing-document metadata entry the organization owns — envelopes, recipients, templates and audit trails — as one portable payload for a data portability request.

Outcome

Export every Sign record and signing-document metadata entry the organization owns — envelopes, recipients, templates and audit trails — as one portable payload for a data portability request.

Before you start

  • Verify the environment, authenticated identity and specifically approved organization context.
  • The published application permission is privacy:read. Privacy operates across the authenticated organization; a workspace header does not narrow its effects.

Discover the target

topolo whoami --json
topolo actions get app_topolo_sign.organizations.data.export --detail --json
  • Use the specifically approved organization context. Retain privacy exports securely.

Request

GET /api/organizations/data/export

Inspect and test this action. Save the reviewed input as payload.json. Supply resource context separately.

Input fields

Use an empty input object; credential and resource context are separate.

Read the complete input schema.

Effects

  • Export every Sign record and signing-document metadata entry the organization owns — envelopes, recipients, templates and audit trails — as one portable payload for a data portability request.

Interpret the response

Read $.organization_id for the returned organization_export identifier. An empty collection does not discover a target.

Compare organization_id to the approved organization and confirm credentials_included is false. Inspect all core, envelope and audit collections. This is organization-wide, and workspace context does not narrow it. Retain the export securely; recipient and agreement content remain sensitive.

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.

Supported request · Export organization records with signing credentials withheld

Input · payload.json:

{}

CLI:

topolo actions validate app_topolo_sign.organizations.data.export --data @payload.json --json
topolo actions plan app_topolo_sign.organizations.data.export --data @payload.json --json
topolo actions call app_topolo_sign.organizations.data.export --data @payload.json --detail --json

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_sign.organizations.data.export",
    "input": {},
    "detail": true
  }
}

Captured exported Worker response · HTTP 200:

{
  "success": true,
  "organization_id": "org_acme",
  "credentials_included": false,
  "data": {
    "core": {
      "sign_workspaces": [
        {
          "id": "ws_default",
          "organization_id": "org_acme",
          "status": "active",
          "created_at": "2026-10-05T18:07:40.428Z",
          "updated_at": "2026-10-05T18:07:40.428Z"
        }
      ],
      "sign_templates": [
        {
          "id": "8a821f8b-b0d1-4808-a92e-8d3f16e4228f",
          "organization_id": "org_acme",
          "workspace_id": "ws_default",
          "name": "Fixture agreement",
          "description": "Reviewed local fixture",
          "status": "active",
          "document_title": "Fixture agreement",
          "default_subject": "Review the fixture",
          "default_message": "Synthetic local example only.",
          "signer_roles_json": "[\"Signer\"]",
          "field_schema_json": "[{\"id\":\"fixture_signature\",\"type\":\"signature\",\"label\":\"Signature\",\"required\":true,\"assignee\":{\"role\":\"Signer\",\"capacity\":\"personal\"},\"placement\":{\"page\":1,\"x\":0.1,\"y\":0.7,\"width\":0.3,\"height\":0.08}}]",
          "created_by_user_id": "usr_sign_fixture",
          "created_by_email": "operator@example.test",
          "created_at": "2026-10-05T18:07:40.450Z",
          "updated_at": "2026-10-05T18:07:40.458Z",
          "document_ref": "sign-document:92c3741e-171c-439c-9419-597ffe485224",
          "field_schema_version": 2
        }
      ],
      "sign_documents": [
        {
          "id": "92c3741e-171c-439c-9419-597ffe485224",
          "organization_id": "org_acme",
          "workspace_id": "ws_default",
          "r2_key": "org_acme/ws_default/documents/92c3741e-171c-439c-9419-597ffe485224/original-bc75a1b1ad4d41a275e3a4dadd9a6031e0c56029e486e47a181ba84891acc97f",
          "file_name": "Fixture-agreement.pdf",
          "document_title": "Fixture agreement",
          "content_type": "application/pdf",
          "size_bytes": 861,
          "sha256_hex": "bc75a1b1ad4d41a275e3a4dadd9a6031e0c56029e486e47a181ba84891acc97f",
          "created_by_user_id": "usr_sign_fixture",
          "created_by_email": "operator@example.test",
          "created_at": "2026-10-05T18:07:40.431Z",
          "updated_at": "2026-10-05T18:07:40.431Z",
          "version": 1,
          "previous_version_id": null,
          "ingestion_status": "ready",
          "pdf_r2_key": "org_acme/ws_default/documents/92c3741e-171c-439c-9419-597ffe485224/original-bc75a1b1ad4d41a275e3a4dadd9a6031e0c56029e486e47a181ba84891acc97f",
          "pdf_sha256": "bc75a1b1ad4d41a275e3a4dadd9a6031e0c56029e486e47a181ba84891acc97f",
          "pdf_size_bytes": 861,
          "page_count": 1,
          "pages_json": "[{\"width\":612,\"height\":792}]",
          "provenance_json": "{\"ingestor\":\"topolo-sign-ingest/2\",\"channel\":\"inline-base64\",\"uploadedByUserId\":\"usr_sign_fixture\",\"uploadedByEmail\":\"operator@example.test\",\"clientFileName\":\"Fixture agreement.pdf\",\"declaredContentType\":\"application/pdf\",\"detectedContentType\":\"application/pdf\",\"normalizedToPdf\":false,\"pdfVersion\":\"1.7\",\"previousVersionId\":null,\"previousSha256\":null,\"requestId\":\"bb3be417-ae54-41fe-82d6-bef90d5164d6\",\"ingestedAt\":\"2026-10-05T18:07:40.431Z\"}"
        }
      ]
    },
    "envelope": {
      "sign_envelopes": [
        {
          "id": "b0db0353-6d5a-4a9b-b3f4-85f439ec4953",
          "organization_id": "org_acme",
          "workspace_id": "ws_default",
          "template_id": "8a821f8b-b0d1-4808-a92e-8d3f16e4228f",
          "title": "Fixture agreement",
          "subject": "Review the fixture",
          "message": "Synthetic signing journey, no live agreement.",
          "status": "draft",
          "source_app": null,
          "source_ref": null,
          "document_title": "Fixture agreement",
          "document_ref": "sign-document:92c3741e-171c-439c-9419-597ffe485224",
          "completed_at": null,
          "voided_at": null,
          "created_by_user_id": "usr_sign_fixture",
          "created_by_email": "operator@example.test",
          "created_at": "2026-10-05T18:07:40.462Z",
          "updated_at": "2026-10-05T18:07:40.476Z",
          "field_schema_json": "[{\"id\":\"fixture_signature\",\"type\":\"signature\",\"label\":\"Signature\",\"required\":true,\"assignee\":{\"role\":\"Signer\",\"capacity\":\"personal\"},\"placement\":{\"page\":1,\"x\":0.1,\"y\":0.7,\"width\":0.3,\"height\":0.08}}]",
          "field_schema_version": 2,
          "source_document_id": null,
          "source_document_version": null,
          "source_sha256": null,
          "source_r2_key": null,
          "source_page_count": null,
          "source_pages_json": null,
          "completed_sha256": null,
          "correlation_id": "sgn_21282514-5ec2-4694-b413-1c113e14193b",
          "public_origin": null
        }
      ],
      "sign_recipients": [],
      "sign_notification_outbox": [],
      "sign_field_values": [],
      "sign_envelope_artifacts": [],
      "sign_revoked_signing_tokens": []
    },
    "audit": {
      "sign_audit_events": [
        {
          "id": "bb368dd7-b119-44df-90cc-51647043472f",
          "organization_id": "org_acme",
          "workspace_id": "ws_default",
          "envelope_id": "b0db0353-6d5a-4a9b-b3f4-85f439ec4953",
          "recipient_id": null,
          "event_type": "envelope.created",
          "actor_type": "user",
          "actor_email": "operator@example.test",
          "metadata_json": "{\"recipientCount\":1,\"fieldCount\":1,\"sourceApp\":null,\"sourceRef\":null}",
          "created_at": "2026-10-05T18:07:40.462Z"
        },
        {
          "id": "3693a899-7ef0-4e60-944b-c07d527bc692",
          "organization_id": "org_acme",
          "workspace_id": "ws_default",
          "envelope_id": "b0db0353-6d5a-4a9b-b3f4-85f439ec4953",
          "recipient_id": null,
          "event_type": "envelope.updated",
          "actor_type": "user",
          "actor_email": "operator@example.test",
          "metadata_json": "{\"recipientCount\":0,\"fieldCount\":1,\"sourceApp\":null,\"sourceRef\":null}",
          "created_at": "2026-10-05T18:07:40.476Z"
        }
      ]
    },
    "document_objects": [
      {
        "key": "org_acme/ws_default/documents/92c3741e-171c-439c-9419-597ffe485224/original-bc75a1b1ad4d41a275e3a4dadd9a6031e0c56029e486e47a181ba84891acc97f",
        "file_name": "Fixture-agreement.pdf",
        "content_type": "application/pdf",
        "size_bytes": 861,
        "sha256_hex": "bc75a1b1ad4d41a275e3a4dadd9a6031e0c56029e486e47a181ba84891acc97f"
      }
    ]
  }
}

HTTP 200. Compare organization_id to the approved organization and confirm credentials_included is false. Inspect all core, envelope and audit collections. This is organization-wide, and workspace context does not narrow it. Retain the export securely; recipient and agreement content remain sensitive.

Refused request · HTTP 401

Input · payload.json:

{}

CLI:

topolo actions validate app_topolo_sign.organizations.data.export --data @payload.json --json
topolo actions plan app_topolo_sign.organizations.data.export --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.

Verify the result

  • Compare organization_id to the approved organization and confirm credentials_included is false.
  • Inspect all core, envelope and audit collections. This is organization-wide, and workspace context does not narrow it. Retain the export securely; recipient and agreement content remain sensitive.

Errors and recovery

  • auth_error (HTTP 401): Reauthenticate in the same approved context before retrying.

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

This read changes no organizer data. Resolve identity, permission, resource binding or target state and repeat the same reviewed read. Do not turn a refused read into a mutation.

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.