Create Export
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/exports';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"connector_id":1,"email_id":1,"export_type":"html","dynamic_content_profile_id":"1","options":{"image_mode":"use_cdn","minify_html":true,"locales":["ar-SA"],"folder_id":"example","campaign_id":"example","export_field_values":{"additionalProperty":"example"},"per_locale_options":{"additionalProperty":{"resource_name":"example","update_previous_export":true}}},"cdn_connector_id":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/exports \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "connector_id": 1, "email_id": 1, "export_type": "html", "dynamic_content_profile_id": "1", "options": { "image_mode": "use_cdn", "minify_html": true, "locales": [ "ar-SA" ], "folder_id": "example", "campaign_id": "example", "export_field_values": { "additionalProperty": "example" }, "per_locale_options": { "additionalProperty": { "resource_name": "example", "update_previous_export": true } } }, "cdn_connector_id": 1 }'Creates a new export.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Workspace ID
Request Body
Section titled “Request Body”object
The ID of the Connector (e.g. ESP integration) to export to. Required when export_type is ‘connector’.
Example
1The ID of the Email to export.
Example
1The ID of the Dynamic Content Profile to use when rendering the export. If null, dynamic content is resolved with default values.
Example
1object
How images should be handled in the export.
Whether to minify rendered HTML before saving export output.
The ID of the folder to export to
The ID of the campaign to export to
Key-value pairs of connector-specific fields to include with the export.
object
Per-locale export options, keyed by locale code (e.g. “en-US”).
object
object
The name for the exported resource in the connector.
Whether to update a previously exported resource instead of creating a new one.
The ID of the CDN Connector to use for hosting images in the exported email. If null, default image URLs are used.
Example
1Responses
Section titled “Responses”Successful
object
object
object
How images should be handled in the export.
Whether to minify rendered HTML before saving export output.
The ID of the folder to export to
The ID of the campaign to export to
Key-value pairs of connector-specific fields to include with the export.
object
Per-locale export options, keyed by locale code (e.g. “en-US”).
object
object
The name for the exported resource in the connector.
Whether to update a previously exported resource instead of creating a new one.
object
object
object
Example
{ "id": 12345, "organization_id": 12345, "connector_id": 12345, "cdn_connector_id": 12345, "email_id": 12345, "email": { "id": 12345 }, "dynamic_content_profile_id": "a8c5c5c0-5b1a-4b5a-9b0a-5e8b5c5c5c5c", "status": "in_progress", "export_type": "json", "options": { "image_mode": "use_cdn", "locales": [ "ar-SA" ] }, "integration_name": "Brevo", "metadata": { "conditional_ids": [ 12345 ], "personalization_tag_ids": [ 12345 ], "image_ids": [ 12345 ] }, "export_errors": { "base": [ "My Error" ], "additionalProperties": { "additionalProperty": [ "My Error" ] } }, "created_at": "2023-08-23T10:30:00.000Z", "updated_at": "2023-08-23T10:30:00.000Z", "download_zip_url": "https://www.example.com/download.zip", "download_json_url": "https://www.example.com/download.json", "open_in_integration_url": "https://www.example.com/integrations/mailchimp/export/12345"}Unauthorized
object
Example
{ "message": "Record not found"}Forbidden
object
Example
{ "message": "Record not found"}Unprocessable Entity
object
object
Example
{ "errors": { "username": [ "Username is required.", "Username must be unique." ], "email": [ "Invalid email format." ] }}