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.
Endpoint reference
This reference is generated from the OpenAPI specification for this endpoint. To run the endpoint, copy the generated cURL example and send it from your terminal or Postman. You can also download the raw OpenAPI spec for this page at /docs/assets/api/openapi/export_user_data_post_users_segment.yaml. Use this spec to validate that your requests include the correct parameters, fields, and structure before you send them. To learn how, see Use OpenAPI schemas for request validation.