Retained immutable local-fixture guide, refreshed against current production catalog metadata. No examples were rerun by this author; no production action was invoked.
Export Campaigns organization data
Outcome
Exports the explicitly authorized organization across Campaigns stores, with secret-like fields redacted. It excludes canonical platform identity, delivered Notify records, provider credentials and backups. Workspace recipient settings are not included in this export. It does not erase records.
Before you start
- Verify the intended environment, authenticated identity and organization before discovery.
- Discover the published privacy:read application permission and inspect the credential-scoped action contract.
- Use the explicitly authorized organization id. This organization export spans Campaigns stores rather than one workspace.
- Fixture identifiers and simulated responses confer no live access. Replace identifiers through granted resource discovery.
Discover the target
topolo whoami --json
topolo actions get app_topolo_campaigns.organizations.data.export --json
- Select the organization.id returned by identity/context discovery and verify that this organization export is intended.
Request
GET /api/organizations/{organizationId}/data
Input fields
| Field | Required | Meaning and constraints |
|---|---|---|
organizationId | Yes | Explicit, authorized organization identifier from identity/context discovery; the export spans this organization. Type: string. minLength: 1 |
Worked examples
organization export · HTTP 200
Input · payload.json:
{
"organizationId": "org_campaign_docs_fixture"
}
CLI:
topolo actions validate app_topolo_campaigns.organizations.data.export --data @payload.json --json
topolo actions plan app_topolo_campaigns.organizations.data.export --data @payload.json --json
topolo actions call app_topolo_campaigns.organizations.data.export --data @payload.json --json
MCP tool and arguments:
{
"tool": "topolo_read_action",
"arguments": {
"actionId": "app_topolo_campaigns.organizations.data.export",
"input": {
"organizationId": "org_campaign_docs_fixture"
}
}
}
Captured local response · HTTP 200:
{
"success": true,
"data": {
"organization_id": "org_campaign_docs_fixture",
"exported_at": "2026-10-07T00:00:00.000Z",
"credentials_included": false,
"stores": {
"campaigns_redemptions": [
{
"id": "redemption_docs_fixture",
"organization_id": "org_campaign_docs_fixture",
"workspace_id": "ws_campaign_docs_fixture",
"code_id": "code_docs_fixture",
"campaign_id": "campaign_docs_fixture",
"redeemed_by": null,
"value": 20,
"commission_accrued": 2,
"source": "manual",
"metadata_json": {},
"redeemed_at": "2026-10-07T00:00:00.000Z"
}
],
"campaigns_journey_events": [
{
"id": "journey_docs_fixture",
"organization_id": "org_campaign_docs_fixture",
"workspace_id": "ws_campaign_docs_fixture",
"campaign_id": "campaign_docs_fixture",
"code_id": "code_docs_fixture",
"placement_id": "placement_docs_fixture",
"event_type": "scanned",
"subject_ref": null,
"external_ref": null,
"metadata_json": {},
"occurred_at": "2026-10-07T00:00:00.000Z",
"created_at": "2026-10-07T00:00:00.000Z"
}
],
"campaigns_placements": [
{
"id": "placement_docs_fixture",
"organization_id": "org_campaign_docs_fixture",
"workspace_id": "ws_campaign_docs_fixture",
"campaign_id": "campaign_docs_fixture",
"code_id": "code_docs_fixture",
"label": "Fixture venue",
"venue_ref": null,
"status": "placed",
"placed_at": "2026-10-07T00:00:00.000Z",
"ended_at": null,
"metadata_json": {},
"created_at": "2026-10-07T00:00:00.000Z",
"updated_at": "2026-10-07T00:00:00.000Z"
}
],
"campaigns_redemption_failures": [],
"campaigns_batch_failures": [],
"campaigns_completions": [],
"campaigns_codes": [
{
"id": "code_docs_fixture",
"organization_id": "org_campaign_docs_fixture",
"workspace_id": "ws_campaign_docs_fixture",
"campaign_id": "campaign_docs_fixture",
"code": "DOCS-FIXTURE",
"owner_ref": null,
"quro_slug": null,
"status": "active",
"created_by_user_id": null,
"created_by_email": null,
"created_at": "2026-10-07T00:00:00.000Z",
"updated_at": "2026-10-07T00:00:00.000Z",
"batch_id": "batch_docs_fixture"
}
],
"campaigns_integrations": [
{
"id": "integration_docs_fixture",
"organization_id": "org_campaign_docs_fixture",
"workspace_id": "ws_campaign_docs_fixture",
"campaign_id": "campaign_docs_fixture",
"application_id": "app_topolo_quro",
"resource_type": "series",
"resource_id": "series_docs_fixture",
"purpose": "qr_series",
"metadata_json": {},
"created_at": "2026-10-07T00:00:00.000Z",
"updated_at": "2026-10-07T00:00:00.000Z"
}
],
"campaigns_batches": [
{
"id": "batch_docs_fixture",
"organization_id": "org_campaign_docs_fixture",
"workspace_id": "ws_campaign_docs_fixture",
"campaign_id": "campaign_docs_fixture",
"name": "Fixture batch",
"status": "active",
"planned_count": 2,
"created_by_user_id": null,
"created_by_email": null,
"created_at": "2026-10-07T00:00:00.000Z",
"updated_at": "2026-10-07T00:00:00.000Z"
}
],
"campaigns_campaigns": [
{
"id": "campaign_docs_fixture",
"organization_id": "org_campaign_docs_fixture",
"workspace_id": "ws_campaign_docs_fixture",
"type": "event",
"name": "Fixture campaign",
"status": "active",
"offer_id": null,
"commission_json": {
"kind": "pct",
"value": 10
},
"attribution_json": {},
"created_by_user_id": null,
"created_by_email": null,
"created_at": "2026-10-07T00:00:00.000Z",
"updated_at": "2026-10-07T00:00:00.000Z",
"deleted_at": null
}
],
"campaigns_offers": [],
"campaigns_workspaces": [
{
"id": "ws_campaign_docs_fixture",
"organization_id": "org_campaign_docs_fixture",
"status": "active",
"created_at": "2026-10-07T00:00:00.000Z",
"updated_at": "2026-10-07T00:00:00.000Z"
},
{
"id": "ws_campaign_empty_fixture",
"organization_id": "org_campaign_docs_fixture",
"status": "active",
"created_at": "2026-10-07T00:00:00.000Z",
"updated_at": "2026-10-07T00:00:00.000Z"
}
],
"campaigns_notification_deliveries": []
},
"excluded": {
"platform_identity": "Organization, user, grants, and canonical workspace identity are owned by Topolo Auth.",
"delivered_notifications": "Delivered notification records and recipient preferences are owned by Topolo Notify.",
"provider_credentials": "Campaigns stores no provider credentials; provider execution remains behind platform services.",
"backups": "Encrypted backups follow the platform backup retention and erasure schedule."
}
}
}
organization export: HTTP 200.
other organization · HTTP 403
Input · payload.json:
{
"organizationId": "org_other_fixture"
}
CLI:
topolo actions validate app_topolo_campaigns.organizations.data.export --data @payload.json --json
topolo actions plan app_topolo_campaigns.organizations.data.export --data @payload.json --json
MCP tool and arguments:
{
"tool": "topolo_prepare_action",
"arguments": {
"actionId": "app_topolo_campaigns.organizations.data.export",
"input": {
"organizationId": "org_other_fixture"
}
}
}
Captured local response · HTTP 403:
{
"error": "organization_forbidden"
}
other organization: HTTP 403; SDK code permission_denied.
permission denied · HTTP 403
Input · payload.json:
{
"organizationId": "org_campaign_docs_fixture"
}
CLI:
topolo actions validate app_topolo_campaigns.organizations.data.export --data @payload.json --json
topolo actions plan app_topolo_campaigns.organizations.data.export --data @payload.json --json
MCP tool and arguments:
{
"tool": "topolo_prepare_action",
"arguments": {
"actionId": "app_topolo_campaigns.organizations.data.export",
"input": {
"organizationId": "org_campaign_docs_fixture"
}
}
}
Captured local response · HTTP 403:
{
"error": "forbidden"
}
permission denied: HTTP 403; SDK code permission_denied.
authentication missing · HTTP 401
Input · payload.json:
{
"organizationId": "org_campaign_docs_fixture"
}
CLI:
topolo actions validate app_topolo_campaigns.organizations.data.export --data @payload.json --json
topolo actions plan app_topolo_campaigns.organizations.data.export --data @payload.json --json
MCP tool and arguments:
{
"tool": "topolo_prepare_action",
"arguments": {
"actionId": "app_topolo_campaigns.organizations.data.export",
"input": {
"organizationId": "org_campaign_docs_fixture"
}
}
}
Captured local response · HTTP 401:
{
"error": "Authentication required"
}
authentication missing: HTTP 401; SDK code auth_error.
Verify the result
- Confirm data.organization_id equals the intended authenticated organization, credentials_included is false, and inspect exported_at, stores and excluded. This export is scoped to this application and does not establish a complete platform export.
Errors and recovery
permission_denied(HTTP 403): Preserve the refusal. Verify the exact application permission and canonical workspace grant, or the organization boundary for export. Do not widen context or retry with a different resource to evade a denial.auth_error(HTTP 401): Authenticate again in the intended environment and pinned organization, then repeat identity and resource discovery.
Authentication, input validation or resource middleware can refuse a request before these handlers. Preserve the actual refusal and request id.
Recovery boundary
These reads do not change campaign-domain records and require no domain rollback. A permission or privacy refusal is authoritative; preserve its context and request id.
Related actions
No follow-up action is required by this read.
Evidence
Actual Campaigns handleRequest, permission checks, store queries and replayed SQLite migrations. Credential verification and canonical workspace grants are simulated at the Auth package boundary; egress is sealed. No deployed/provider outcome, live redemption, outbound communication or live access is demonstrated.
Current field meanings and contract
| Field | Required | Meaning and validation |
|---|---|---|
organizationId | Yes | Exact caller organization for this privacy operation; it is an input selector, not a newly invented resource alias. string; minLength=1 |
Exact schemas and provenance
Input schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"organizationId": {
"type": "string",
"minLength": 1
}
},
"required": [
"organizationId"
],
"additionalProperties": false
}
Output schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"success": {
"type": "boolean",
"const": true
},
"data": {
"type": "object",
"properties": {
"organization_id": {
"type": "string"
},
"exported_at": {
"type": "string"
},
"credentials_included": {
"type": "boolean",
"const": false
},
"stores": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema0"
}
}
}
},
"excluded": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"organization_id",
"exported_at",
"credentials_included",
"stores",
"excluded"
],
"additionalProperties": false
}
},
"required": [
"success",
"data"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema0"
}
}
]
}
}
}
Reviewed immutable source: TopoloCampaigns@cacbb8b12b4e19a662cf82d03a927aef3c3a35e8, docs/action-read-records.json. Fresh production catalog was read on 2026-10-20. Its publication metadata is not proof that this source is loaded. Output examples are not widened or rewritten to force schema success; the accompanying validation record classifies exact success, refusal, no-body and structural-schema limits.
Local input rejection example
This deliberately invalid input belongs to a pure schema check; it is never a planned or executed request. The closed action input schema must reject the extra field. It has no HTTP status or server response.
{
"organizationId": "org_campaign_docs_fixture",
"__unsupported_field": true
}
The hidden companion labels this as ILLUSTRATIVE_LOCAL_SCHEMA_CHECK; its validation representation is not an action output.
Published output validation limits
Current published output qualification: the output schema rejects the empty-object, partial-success-marker, partial-data-object and refusal-body probes. A schema-valid success body still does not establish execution, live permission, selected context or a provider outcome.
These observations come from pure checks of the exact published schema; they are not server responses or production captures.