exportCustomerPersonalData
Requires permission customers:privacy:manage.
Export one customer's data to a presigned NDJSON download and tell every app holding customer data (customers.data_request). Needs the customer privacy permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation ExportCustomerPersonalData($customerId: ID!) {
exportCustomerPersonalData(customerId: $customerId) {
objectName
downloadUrl
expiresInSeconds
perModelCounts
recordCount
requestId
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation ExportCustomerPersonalData($customerId: ID!) {\n exportCustomerPersonalData(customerId: $customerId) {\n objectName\n downloadUrl\n expiresInSeconds\n perModelCounts\n recordCount\n requestId\n }\n}",
"variables": {
"customerId": "id"
}
}
EOF
Variables:
{
"customerId": "id"
}
Response:
{
"data": {
"exportCustomerPersonalData": {
"objectName": "string",
"downloadUrl": "string",
"expiresInSeconds": 0,
"perModelCounts": "string",
"recordCount": 0,
"requestId": "string"
}
}
}
exportCustomerPersonalData(
customerId: ID!
): CustomerDataExportResult!
Arguments
exportCustomerPersonalData.customerId ● ID! non-null scalar
The customer to export, in your organization.
Type
CustomerDataExportResult object
The result of exporting one customer's data. The file lives in storage and is not returned in the response.