For Salesforce Marketing Cloud developers, tracking contacts in Journey Builder has always been tricky—especially when trying to identify who passed through wait activities. While Data Views capture email interactions, monitoring wait states has historically required workarounds, such as adding Update Contact activities to funnel contacts into a Data Extension.
But what if you need this data on demand—without pre-configuring your journey?
Enter the Summer ’23 release’s game-changing feature: Journey Builder History Download via REST API.
Why This API Is a Game-Changer
- ✅ Extract journey history (last 30 days) in CSV/TSV format
- ✅ Filter by activity type (e.g., wait activities)
- ✅ Specify time ranges for precise data retrieval
- ✅ Avoid duplicates by filtering for “complete” status
- ✅ Check file size before download (max 1 GB)
No more clunky workarounds—just clean, direct access to the data you need.
How to Use the API: Step-by-Step Guide
1. Prerequisites
Before diving in, ensure you have:
- REST Base URL
- Access Token (with
Journeys - Read
andContacts - Read
scopes) - Wait Activity ID
⚠️ Missing the Contacts scope? Extracted contacts may appear as “Unknown”.
2. API Request Setup (Using Talend API Tester or Postman)
Request Structure
http
Copy
POST https://[REST Base URL].rest.marketingcloudapis.com/interaction/v1/interactions/journeyhistory/download?columns=ContactKey Headers: Content-Type: application/json Authorization: Bearer [Access Token] x-direct-pipe: true Body: { "activityIds": ["8bb8d44a-9576-4ec8-9b19-576c56ec1746"], // Your Wait Activity ID "statuses": ["complete"] // Avoids duplicate entries }
Key Notes:
- Default fields returned:
ContactKey
,ActivityId
,Status
,TransactionTime
, etc. - Need more columns? Use:Copy?columns=ContactKey,ActivityName,ActivityType,Status,TransactionTime
- Time-based filtering? Add
start
andend
(UTC):jsonCopy{ “start”: “2024-01-30T23:00:00Z”, “end”: “2024-01-31T09:00:00Z”, “activityIds”: [“f8acd255-19da-4d88-beaf-d2efba9b9279”], “statuses”: [“complete”] }
3. Download Your Data
After a successful 200 OK response:
- Click “Download” to retrieve the CSV/TSV file.
- Reuse the saved request for future extractions.
Advanced Use Cases
The API isn’t just for wait activities—you can also extract:
1. Contacts Who Met a Goal
json
Copy
{ "definitionIds": ["a8787c44-d866-4b3a-bf71-f515b9a5c63f"], // Version ID, not Journey ID "activityTypes": ["goalcriteriaactivity"] }
2. Contacts Who Exited the Journey
json
Copy
{ "definitionIds": ["86f7c10b-76fa-4f5f-94b5-8afc6d0509af"], "statuses": ["ExitCriteriaMet"] }
3. Contacts Who Entered the Journey
json
Copy
{ "definitionIds": ["370c64da-781b-4f67-a10a-7722b74e73bb"], "activityTypes": ["startinteractionactivity"] }
🔍 Need the Version ID? Here’s an easy way to retrieve it.
Final Thoughts
This API eliminates the need for manual tracking or pre-configured activities, giving developers real-time flexibility in extracting journey data.
🔹 No more workarounds
🔹 No more guesswork
🔹 Just clean, actionable data
Next steps? Experiment with different filters, automate downloads, and integrate this into your reporting workflows.