Skip to content
View as Markdown
Enter your site to enable Send. Requests are sent from your browser, so the site must allow cross-origin calls (CORS).

POST Export Campaign Emails​

POST
/exports/campaign-emails

Download the archived per-recipient emails of a campaign as a CSV.

This is a POST-only attachment endpoint: submit it as a form (application/x-www-form-urlencoded) including a _wpnonce REST nonce. The server verifies the nonce, then streams the file and ends the request, so use it from a browser form or download link, not as a JSON API.

Required capability: fcrm_manage_contacts_export

Enforced by ExportPolicy::verifyRequest(), the policy default for this route group.

Requires: FluentCampaign Pro. Without it the route does not exist.

Authorizations​

ApplicationPasswords

WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password

Type
API Key (header: Authorization)

Request Body​

application/x-www-form-urlencoded
object

ID of the campaign whose archived emails are exported.

Optional filter applied to the exported emails (read by the exporter; empty exports all).

A wp_rest nonce (wp_create_nonce('wp_rest')). Required — without a valid one the route returns 403 before any data is read. The admin UI submits it in a temporary form body so it never appears in a URL.

Responses​

The export streams back as a file attachment (<campaign_id>-archived-campaign-emails-<filter>.csv); the response is not wrapped in the usual JSON envelope.

text/csv

Playground​

Authorization
Body

Samples​

Powered by VitePress OpenAPI