Account
Export account data
Returns all personal data associated with the authenticated user in a structured JSON format. Supports GDPR data portability and CCPA right to know. Audit logs are limited to the most recent 1000 entries.
At a glance
| Item | Value |
|---|---|
| Method | GET |
| Path | /v1/account/export |
| Auth | Authorization: Bearer <token-or-api-key> |
Quick request
Use this as a starting point. Replace the placeholder IDs and set PGBEAM_TOKEN if the endpoint requires auth.
curl -X GET \
"$PGBEAM_API_URL/v1/account/export" \
-H "Authorization: Bearer $PGBEAM_TOKEN"AuthorizationBearer <token>
JWT issued by Better Auth. Verified via JWKS.
In: header
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://api.pgbeam.com/v1/account/export"{
"user": {
"id": "string",
"name": "string",
"email": "user@example.com",
"email_verified": true,
"image": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
},
"organizations": [
{
"id": "string",
"name": "string",
"slug": "string",
"role": "string",
"created_at": "2019-08-24T14:15:22Z"
}
],
"projects": [
{
"id": "string",
"org_id": "string",
"name": "string",
"description": "string",
"status": "string",
"created_at": "2019-08-24T14:15:22Z"
}
],
"databases": [
{
"id": "string",
"project_id": "string",
"host": "string",
"port": 0,
"name": "string",
"ssl_mode": "string",
"role": "string",
"created_at": "2019-08-24T14:15:22Z"
}
],
"sessions": [
{
"id": "string",
"expires_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"ip_address": "string",
"user_agent": "string"
}
],
"email_preferences": {
"marketing_emails": true,
"usage_limit_alerts": true
},
"consents": [
{
"id": "string",
"document_type": "string",
"document_version": "string",
"accepted_at": "2019-08-24T14:15:22Z",
"ip_address": "string"
}
],
"audit_logs": [
{
"id": "string",
"action": "string",
"resource_type": "string",
"resource_id": "string",
"ip_address": "string",
"created_at": "2019-08-24T14:15:22Z"
}
],
"exported_at": "2019-08-24T14:15:22Z"
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}