Skip to main content

Open rate per campaign

message sent on this date has this many opens.

This report focuses on the open rate of the emails sent from your campaigns. It breaks down the number of emails sent and their open rates by campaign, day, mailbox, path, step, and version. For campaigns sent from multiple mailboxes, the data will be separated by each mailbox.

You can preview example results below

Generating a report

Use the below endpoint to generate a report hash. Afterwards use the rest/v2/reports/{hash} to retrieve the statistics data.

Request

Endpoint

POST https://api.woodpecker.co/rest/v2/reports/open_rate

Headers

x-api-key: {YOUR_API_KEY}
Content-type: application/json

For details on how to authenticate your requests, please see the authentication guide.

Body

A JSON object containing from and to date fields, that define the date period for the report's data generation.

info

You can generate data for up to 30 last days

{
"from": "YYYY-MM-DD",
"to": "YYYY-MM-DD"
}
FieldTypeDescriptionExample
fromstringStart date of the report in ISO 8601 format"2025-01-01"
tostringEnd date of the report in ISO 8601 format"2025-01-31"

Request sample

Generate a report hash
curl --request POST \
--url "https://api.woodpecker.co/rest/v2/reports/open_rate" \
--header "Content-Type: application/json" \
--header "x-api-key: {YOUR_API_KEY}" \
--data '{
"from": "YYYY-MM-DD",
"to": "YYYY-MM-DD"
}'

Response

Response examples

The response is a hash that you should use the fetch the report content using the rest/v2/reports/{hash} endpoint.

{
"hash":"c966572e5b7c12d73f....347b5186242782c9550d"
}
Body schema
FieldTypeDescription
hashstringRepresentation of the report's ID. Use it to fetch the generated data

Retrieving a report

After requesting the report generation, you can fetch it using the below endpoint. Insert the hash, obtained from the above request, to the URL.

Preparing the data may take some time. Please check the status value to monitor the progress. The possible statuses are PENDING, WAITING, IN_PROGRESS, READY and FAILED.

Request

Endpoint

GET https://api.woodpecker.co/rest/v2/reports/{hash}

Headers

x-api-key: {YOUR_API_KEY}

For details on how to authenticate your requests, please see the authentication guide.

Parameters

By default, the results are sorted by id, sent_date, step and version ascending. You can change the order by using one of the sort parameter and one of the values.

KeyValueRequiredDescription
sort+id/-idNoSort the results by data[].id. Use - for descending and + for ascending
sort+sent_date/-sent_date   NoSort the results by data[].sent_date. Use - for descending and + for ascending

Request sample

Retrieve a report using the hash
curl --request GET \
--url "https://api.woodpecker.co/rest/v2/reports/{hash}" \
--header "x-api-key: {YOUR_API_KEY}"

Response

Response examples

This example presents campaign statistics for the period from January 10 to January 15, 2025, covering two campaigns. Each object represents a number of emails sent and their open rates, grouped by campaign, day, path, step and version.

The campaign with ID 1234567 is a linear campaign that does not have any conditions/paths and doesn't include A/B versions either. In contrast, campaign 9876543 has a condition after the first email step, contains A/B versions of the first step email and is sent from two mailboxes.

{
"status": "READY",
"report": {
"description": "Open_rate_per_campaign_2025-01-10-2025-01-15",
"data": [
{
"id": 1234567,
"name": "Simple linear campaign",
"sent_date": "2025-01-10",
"sent_from": "email-0@mail.com",
"path": "",
"step": 1,
"version": "A",
"sent": 50,
"delivered": 49,
"opened": 22,
"open_rate": "44.9%"
},
{
"id": 1234567,
"name": "Simple linear campaign",
"sent_date": "2025-01-14",
"sent_from": "email-0@mail.com",
"path": "",
"step": 2,
"version": "A",
"sent": 49,
"delivered": 49,
"opened": 20,
"open_rate": "40.8%"
},
{
"id": 9876543,
"name": "Multiple mailboxes, condition and A/B versions",
"sent_date": "2025-01-12",
"sent_from": "email-1@mail.com",
"path": "Path YES/NO",
"step": 1,
"version": "A",
"sent": 25,
"delivered": 25,
"opened": 16,
"open_rate": "64.0%"
},
{
"id": 9876543,
"name": "Multiple mailboxes, condition and A/B versions",
"sent_date": "2025-01-12",
"sent_from": "email-1@mail.com",
"path": "Path YES/NO",
"step": 1,
"version": "B",
"sent": 25,
"delivered": 25,
"opened": 17,
"open_rate": "68.0%"
},
{
"id": 9876543,
"name": "Multiple mailboxes, condition and A/B versions",
"sent_date": "2025-01-12",
"sent_from": "email-2@mail.com",
"path": "Path YES/NO",
"step": 1,
"version": "A",
"sent": 30,
"delivered": 29,
"opened": 13,
"open_rate": "44.8%"
},
{
"id": 9876543,
"name": "Multiple mailboxes, condition and A/B versions",
"sent_date": "2025-01-12",
"sent_from": "email-2@mail.com",
"path": "Path YES/NO",
"step": 1,
"version": "B",
"sent": 30,
"delivered": 28,
"opened": 16,
"open_rate": "57.1%"
},
{
"id": 9876543,
"name": "Multiple mailboxes, condition and A/B versions",
"sent_date": "2025-01-15",
"sent_from": "email-1@mail.com",
"path": "Path YES",
"step": 2,
"version": "A",
"sent": 20,
"delivered": 20,
"opened": 10,
"open_rate": "50.0%"
},
{
"id": 9876543,
"name": "Multiple mailboxes, condition and A/B versions",
"sent_date": "2025-01-15",
"sent_from": "email-1@mail.com",
"path": "Path NO",
"step": 2,
"version": "A",
"sent": 20,
"delivered": 20,
"opened": 9,
"open_rate": "45.0%"
},
{
"id": 9876543,
"name": "Multiple mailboxes, condition and A/B versions",
"sent_date": "2025-01-15",
"sent_from": "email-2@mail.com",
"path": "Path YES",
"step": 2,
"version": "A",
"sent": 20,
"delivered": 20,
"opened": 11,
"open_rate": "55.0%"
},
{
"id": 9876543,
"name": "Multiple mailboxes, condition and A/B versions",
"sent_date": "2025-01-15",
"sent_from": "email-2@mail.com",
"path": "Path NO",
"step": 2,
"version": "A",
"sent": 20,
"delivered": 19,
"opened": 9,
"open_rate": "47.3%"
}
]
}
}
Body schema
FieldTypeDescription
statusstringStatus of the generation. PENDING, WAITING, IN_PROGRESS, READY, FAILED
reportobject/nullContainer for report details. Null if status is not READY
└─report.descriptionstringFull name of the report and its period
└─report.dataarrayList of campaign statistics
    └─data[].idintegerUnique ID of the campaign
    └─data[].namestringName of the campaign
    └─data[].sent_datestringDate of sending emails from a specific step YYYY-MM-DD
    └─data[].pathstringIndication from which path the emails were sent. "" - there's no condition in this campaign; PATH YES - the sum of sent emails refers to the YES path on a given step; PATH NO - the sum of sent emails refers to the NO path on a given step; PATH YES/NO IF-condition is set up in a further step of the campaign, it has not been evaluated yet
    └─data[].stepintegerStep of the campaign
    └─data[].versionstringA/B/C/D/E version of of a step. Defaults to A
    └─data[].sentintegerNumber of emails sent
    └─data[].deliveredintegerNumber of delivered emails
    └─data[].openedintegerNumber of opened emails
    └─data[].open_rateintegerPercentage of emails opened / emails delivered