Export user profile by segment
/users/export/segment
Use this endpoint to export all the users within a segment.

When using this endpoint, note the following:
1. The fields_to_export field in this API request is required.
2. The fields for custom_events, purchases, campaigns_received, and canvases_received only contain data from the last 90 days.
User data is exported as multiple files of user JSON objects separated by new lines (such as one JSON object per line). Data is exported to an automatically generated URL or to an S3 bucket if this integration is already set up.

Export output format: When an export is successful and you have not configured cloud storage credentials, the HTTP response includes a URL to download a compressed archive (ZIP or GZIP file). When cloud storage credentials (S3, Azure, or Google Cloud Storage) are configured, Braze writes the export directly to your bucket, and the response does not include a download URL. If the export fails, you receive an email notification instead. Setting up cloud storage credentials reduces the likelihood of failures for large exports.
Note that a company may run at most one export per segment using this endpoint at a given time. Wait for your export to complete before trying again.

You can download the OpenAPI document and use it to validate schemas. To learn how, see Use OpenAPI schemas for request validation.