Skip to main content

Export user data

You can export the user data available on the Dashboard, either from your Dashboard or with the API. Review the next steps to understand what happens after finalizing your export.

Dashboard​

  1. On your Dashboard, go to Data > Users.
  2. Click the download icon to trigger a .csv export.
  3. A modal appears. Click Export data to finalize the request.

Screenshot of Swan Dashboard users page with a callout download icon to trigger an export

API​

  1. Call the exportUserData mutation.
  2. Add your email. A link to download the .csv export is sent to the email address you provide.
  3. Add the success payload and rejections.

Mutation​

🔎 Open the mutation in API Explorer

mutation ExportUsers {
exportUserData(input: { email: "$YOUR_EMAIL_ADDRESS" }) {
... on ExportDataSuccessPayload {
__typename
exportId
}
... on MaximumSimultaneousExportsRejection {
__typename
message
}
... on MaximumDailyExportsReachedRejection {
__typename
message
}
}
}

Payload​

The payload returns the export ID.

{
"data": {
"exportUserData": {
"__typename": "ExportDataSuccessPayload",
"exportId": "$EXPORT_ID"
}
}
}

Next steps​

After you finalize your export, whether from your Dashboard or using the API, a link to download the export is sent to you by email. You must be logged in to download the .csv export file.

Download links are valid for seven days, after which you need to generate a new export.

Sharing the download link

If you forward someone the email with the download link, they can only use it if they also have access to the Dashboard. Otherwise, an error occurs.

Instead, consider downloading the document and sending it to them.