POST /interaction/v1/interactions/journeyhistory/download

Downloads journey history to a file. You can specify which fields are returned.

Historical journey data is retained for 30 days. The maximum file size is 1 GB. For an estimate of the file size and row count, use the journey history download estimate request operation.

NameTypeDescriptionAccepted Values
formatstringThe format to use for the output file. The default value is csv.
  • tsv
  • csv
columnsstringComma-separated list of columns to download. The default value is TransactionTime, ContactKey, Status, DefinitionId, DefinitionName, ActivityId, ActivityName, ActivityType.
  • ActivityId
  • ActivityName
  • ActivityType
  • ClientStatus
  • ContactKey
  • CreatedDate
  • DefinitionId
  • DefinitionInstanceId
  • DefinitionName
  • EndDate
  • EntrySource
  • EpochTimeInMilliseconds
  • EventId
  • EventName
  • Id
  • Message
  • OutcomeActivityId
  • SourceType
  • StartDate
  • Status
  • TransactionTime
  • Result.Status
  • Result.Tags
  • Result.Messages
  • Result.Outcome

The request body can contain any of the values in this table.

NameTypeDescriptionPossible Values
startstringThe start date and time for the query, in ISO 8601 format.
endstringThe end date and time for the query, in ISO 8601 format.
contactKeysarrayA comma-separated list of contact keys to retrieve events for.
activityTypesarrayA list of activity types to retrieve events for.
  • waitactivity
  • multicriteriadecision
  • trigger
  • startinteractionactivity
  • stopinteractionactivity
  • rest
  • emailv2
  • updatecontactdata
  • randomsplit
  • salescloudactivity
  • stowait
  • goalcriteriaactivity
  • exitcriteriaactivity
  • pushnotificationactivity
  • engagementdecision
  • pushinboxactivity
  • multicriteriadecisionextension
  • smssync
  • abntest
  • abnteststop
  • restdecision
  • inappsyncactivity
  • einsteinengagementfrequencysplit
  • activeaudiencejourneyactivity
  • wait
  • sendtolinesync
  • waituntilpushengagement
  • pushsync
  • waituntilapi
  • whatsappactivity
  • salesforceleadconversionactivity
  • waituntilchatresponse
definitionIdsarrayA list of journey IDs to retrieve events for.
statusesarrayA list of statuses to retrieve events for.
  • Active
  • Waiting
  • Complete
  • Failed
  • Unknown
  • DidNotMeetEntryCriteria
  • GoalCriteriaAlreadyMet
  • GoalCriteriaNotMet
  • GoalCriteriaMet
  • GoalCriteriaMetInWait
  • MetCriteria
  • ErrorProcessingWaitActivity
  • ErrorOccurredinProcessing
  • ErrorValidatingContact
  • InvalidInteractionId
  • UnableToDeserializeMessage
  • WaitActivtyAlreadyProcessed
  • CouldNotParseInteractionId
  • InteractionNotPublished
  • ContactNotFound
  • CurrentlyWaitingInSameInteraction
  • ContactAlreadyInInteraction
  • ContactObjectNull
  • NotEvaluatingEntryCriteria
  • ErrorDeterminingInitialActivity
  • MovedToHigherPriorityInteraction
  • Deactivated
  • ContactPreviouslyInSameInteraction
  • WaitingForAsync
  • GoalNotDefined
  • StoppedByUser
  • ContactKeyNotProvided
  • ExitCriteriaMet
  • WaitUntilEventCriteriaMet
  • WaitUntilEventCriteriaNotMet
  • ContactIsDeleted
  • ContactIsRestricted
  • ContactExitedByApi
  • ContactStatusIsUnknown
  • ContactExitedAsOutOfMarketAudienceSegment
definitionInstanceIdsarrayA list of definition instance IDs to retrieve events for.
activityIdsarrayA list of activity IDs to retrieve events for.

You can tailor the resulting file to your needs by specifying filters and query values.

The x-direct-pipe: true header shown in these examples is required.

This example downloads all the contacts that failed to enter the journey between 06:00 and 21:00 UTC.

The response includes the fields that you specified in the columns parameter in the query path.

You can specify the contacts that are downloaded by changing the value of the status parameter. This request downloads a list of contacts that didn’t meet the entry criteria in the specified journey. The list is filtered to only include values in the ContactKey column.

The response includes the values in the ContactKey column for the records that didn’t meet the entry criteria.

Limit Results by Activity Type

This example downloads the list of contacts successfully injected into the given journey.

The response includes the values in the ContactKey column for the records that completed the trigger activity.

These tips help optimize your requests by limiting their scope.

  • If you only want to download information about a single journey, include the definitionId for that journey in the request.
  • If you only want to download information about a single journey activity, include the activityId for the activity in the request.
  • Use the columns query parameter to download only the columns that you need. This step reduces the download file size and the time required to complete the request.
  • If your request contains filters that limit certain fields to a single value, including that column in the result isn't necessary. For example, if the response only includes failed events—that is, the request body includes "statuses": ["failed"]—use the columns query parameter to omit the status column from the result.
  • Download data from a small time period, such as 1 hour, by using the start and end parameters in the request body. This step results in better performance. If a download fails, requesting smaller units of data can save time and effort, because you can't resume a failed download.