Skip to content

Export your data

The portal.export.get operation: GET /api/v1/portal/me/export in the REST API and the portal_export_get tool in the MCP server.

GET/api/v1/portal/me/export

Returns everything the brand holds about the signed-in customer as one file: the account with its tax IDs, location evidence, invoices and credit notes with their lines, payments, payment methods, subscriptions, wallets and the credit balance (at most 1,000 records of each type).

  • json: one document grouped by record type.
  • csv: one row per value (record_type,record_id,field,value), nested fields as dotted paths.

The portal offers it as a download. Customer portal only (portal:read).

At a glance

  • REST: GET /api/v1/portal/me/export
  • MCP tool: portal_export_get
  • Operation ID: portal.export.get
  • Scope: Brand
  • Permission: portal:read
  • Risk tier: read
  • Dry run: Not supported
  • Idempotency: Not needed (read only)
  • Modes: Test and live
  • Authentication: A customer signed in to the customer portal (API keys can't call it)
  • Since: M9

Request

Query parameters

FieldTypeRequiredDescription
formatone of json, csvNojson (default) or csv.

Response

200 OK with a JSON object:

FieldTypeDescription
object"portal_export"
formatone of json, csv
filenamestring
contentTypestring
contentstringThe file's text: JSON, or CSV with one row per value.

Examples

CSV export

HTTP
GET /api/v1/portal/me/export?format=csv
Authorization: Bearer or_test_…

Response (200):

JSON
{
  "object": "portal_export",
  "format": "csv",
  "filename": "genno-cus_01m4tx5nj8emwbyf7y9vcf48b1-2026-10-20.csv",
  "contentType": "text/csv; charset=utf-8",
  "content": "record_type,record_id,field,value\r\ncustomer,cus_01m4tx5nj8emwbyf7y9vcf48b1,email,ana@example.com\r\n"
}

Errors

CodeHTTP statusWhenWhat to do
validation_failed400A field or pagination value is malformed.Fix the fields listed in details.issues and send the request again.
livemode_not_allowed403The portal session is in the other mode than the request.Use test mode, or credentials for the target's mode. Developers need live access granted by an organization owner or admin.
permission_denied403The caller isn't a customer signed in to this brand's portal (operators and API keys use the customer operations).Ask an organization owner or admin for a role or scope that allows this action.

It can also return these common errors: api_version_unsupported, authentication_required, api_key_invalid, scope_required, resource_not_found, dry_run_not_supported, rate_limited, internal_error.