Activities export definitions

Below are example export definition requests for all activity types. Creating an export definition is the first step in exporting records from Eloqua. The examples use all possible export fields for each activity type, but you only need to use the fields you wish to actually export and use. If you expect more than 5,000,000 records to be returned in any given export, be sure to filter the results further. Learn more about exporting activities.

Activity types:

Important: There is a maximum of 10 contact fields allowed in an activity export definition. The addition of contact fields to activity exports will add to export time. Contact fields cannot be used in the filter.

Bounceback

Request:

POST /activities/exports

Request body:

{
  "filter": "'{{Activity.Type}}'='Bounceback'",
  "name": "Bulk Activity Export - Bounceback",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "EmailAddress": "{{Activity.Field(EmailAddress)}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "AssetType": "{{Activity.Asset.Type}}",
    "AssetName": "{{Activity.Asset.Name}}",
    "AssetId": "{{Activity.Asset.Id}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "EmailRecipientId": "{{Activity.Field(EmailRecipientId)}}",
    "DeploymentId": "{{Activity.Field(EmailDeploymentId)}}",
    "SmtpErrorCode": "{{Activity.Field(SmtpErrorCode)}}",
    "SmtpStatusCode": "{{Activity.Field(SmtpStatusCode)}}",
    "SmtpMessage": "{{Activity.Field(SmtpMessage)}}"
  }
}

Response body:

{
  "name": "Bulk Activity Export - Bounceback",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "EmailAddress": "{{Activity.Field(EmailAddress)}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "AssetType": "{{Activity.Asset.Type}}",
    "AssetName": "{{Activity.Asset.Name}}",
    "AssetId": "{{Activity.Asset.Id}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "EmailRecipientId": "{{Activity.Field(EmailRecipientId)}}",
    "DeploymentId": "{{Activity.Field(EmailDeploymentId)}}",
    "SmtpErrorCode": "{{Activity.Field(SmtpErrorCode)}}",
    "SmtpStatusCode": "{{Activity.Field(SmtpStatusCode)}}",
    "SmtpMessage": "{{Activity.Field(SmtpMessage)}}"
  },
  "filter": "'{{Activity.Type}}'='Bounceback'",
  "dataRetentionDuration": "PT12H",
  "uri": "/activities/exports/73",
  "createdBy": "API.User",
  "createdAt": "2018-09-20T13:36:51.9304577Z",
  "updatedBy": "API.User",
  "updatedAt": "2018-09-20T13:36:51.9304577Z"
}

Email clickthrough

Request:

POST /activities/exports

Request body:

{
  "filter": "'{{Activity.Type}}'='EmailClickthrough'",
  "name": "Bulk Activity Export - Email Clickthrough",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "IpAddress": "{{Activity.Field(IpAddress)}}",
    "VisitorId": "{{Activity.Visitor.Id}}",
    "VisitorExternalId": "{{Activity.Visitor.ExternalId}}",
    "EmailRecipientId": "{{Activity.Field(EmailRecipientId)}}",
    "AssetType": "{{Activity.Asset.Type}}",
    "AssetName": "{{Activity.Asset.Name}}",
    "AssetId": "{{Activity.Asset.Id}}",
    "SubjectLine": "{{Activity.Field(SubjectLine)}}",
    "EmailWebLink": "{{Activity.Field(EmailWebLink)}}",
    "EmailClickedThruLink": "{{Activity.Field(EmailClickedThruLink)}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "DeploymentId": "{{Activity.Field(EmailDeploymentId)}}",
    "EmailSendType": "{{Activity.Field(EmailSendType)}}",
    "EmailAddress": "{{Activity.Field(EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}",
    "CampaignResponseDate": "{{Activity.CampaignResponse.CreatedAt}}",
    "CampaignResponseMemberStatus": "{{Activity.CampaignResponse.Field(MemberStatus)}}"
  }
}

Response body:

{
  "name": "Bulk Activity Export - Email Clickthrough",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "IpAddress": "{{Activity.Field(IpAddress)}}",
    "VisitorId": "{{Activity.Visitor.Id}}",
    "VisitorExternalId": "{{Activity.Visitor.ExternalId}}",
    "EmailRecipientId": "{{Activity.Field(EmailRecipientId)}}",
    "AssetType": "{{Activity.Asset.Type}}",
    "AssetName": "{{Activity.Asset.Name}}",
    "AssetId": "{{Activity.Asset.Id}}",
    "SubjectLine": "{{Activity.Field(SubjectLine)}}",
    "EmailWebLink": "{{Activity.Field(EmailWebLink)}}",
    "EmailClickedThruLink": "{{Activity.Field(EmailClickedThruLink)}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "DeploymentId": "{{Activity.Field(EmailDeploymentId)}}",
    "EmailSendType": "{{Activity.Field(EmailSendType)}}",
    "EmailAddress": "{{Activity.Field(EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}",
    "CampaignResponseDate": "{{Activity.CampaignResponse.CreatedAt}}",
    "CampaignResponseMemberStatus": "{{Activity.CampaignResponse.Field(MemberStatus)}}"
  },
  "filter": "'{{Activity.Type}}'='EmailClickthrough'",
  "dataRetentionDuration": "PT12H",
  "uri": "/activities/exports/65",
  "createdBy": "API.User",
  "createdAt": "2018-07-17T14:42:39.0510345Z",
  "updatedBy": "API.User",
  "updatedAt": "2018-07-17T14:42:39.0510345Z"
}

Email open

Request:

POST /activities/exports

Request body:

{
  "filter": "'{{Activity.Type}}'='EmailOpen'",
  "name": "Bulk Activity Export - Email Open",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "IpAddress": "{{Activity.Field(IpAddress)}}",
    "VisitorId": "{{Activity.Visitor.Id}}",
    "VisitorExternalId": "{{Activity.Visitor.ExternalId}}",
    "EmailRecipientId": "{{Activity.Field(EmailRecipientId)}}",
    "AssetType": "{{Activity.Asset.Type}}",
    "AssetName": "{{Activity.Asset.Name}}",
    "AssetId": "{{Activity.Asset.Id}}",
    "SubjectLine": "{{Activity.Field(SubjectLine)}}",
    "EmailWebLink": "{{Activity.Field(EmailWebLink)}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "DeploymentId": "{{Activity.Field(EmailDeploymentId)}}",
    "EmailSendType": "{{Activity.Field(EmailSendType)}}",
    "EmailAddress": "{{Activity.Field(EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}",
    "CampaignResponseDate": "{{Activity.CampaignResponse.CreatedAt}}",
    "CampaignResponseMemberStatus": "{{Activity.CampaignResponse.Field(MemberStatus)}}"
  }
}

Response body:

{
    "name": "Bulk Activity Export - Email Open",
    "fields": {
        "ActivityId": "{{Activity.Id}}",
        "ActivityType": "{{Activity.Type}}",
        "ActivityDate": "{{Activity.CreatedAt}}",
        "ContactId": "{{Activity.Contact.Id}}",
        "IpAddress": "{{Activity.Field(IpAddress)}}",
        "VisitorId": "{{Activity.Visitor.Id}}",
        "VisitorExternalId": "{{Activity.Visitor.ExternalId}}",
        "EmailRecipientId": "{{Activity.Field(EmailRecipientId)}}",
        "AssetType": "{{Activity.Asset.Type}}",
        "AssetName": "{{Activity.Asset.Name}}",
        "AssetId": "{{Activity.Asset.Id}}",
        "SubjectLine": "{{Activity.Field(SubjectLine)}}",
        "EmailWebLink": "{{Activity.Field(EmailWebLink)}}",
        "CampaignId": "{{Activity.Campaign.Id}}",
        "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
        "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
        "ExternalId": "{{Activity.ExternalId}}",
        "DeploymentId": "{{Activity.Field(EmailDeploymentId)}}",
        "EmailSendType": "{{Activity.Field(EmailSendType)}}",
        "EmailAddress": "{{Activity.Field(EmailAddress)}}",
        "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}",
        "CampaignResponseDate": "{{Activity.CampaignResponse.CreatedAt}}",
        "CampaignResponseMemberStatus": "{{Activity.CampaignResponse.Field(MemberStatus)}}"
    },
    "filter": "'{{Activity.Type}}'='EmailOpen'",
    "dataRetentionDuration": "PT12H",
    "uri": "/activities/exports/66",
    "createdBy": "API.User",
    "createdAt": "2018-07-17T14:50:52.3183789Z",
    "updatedBy": "API.User",
    "updatedAt": "2018-07-17T14:50:52.3183789Z"
}

Email send

Request:

POST /activities/exports

Request body:

{
  "filter": "'{{Activity.Type}}'='EmailSend'",
  "name": "Bulk Activity Export - Email Send",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "EmailRecipientId": "{{Activity.Field(EmailRecipientId)}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "AssetType": "{{Activity.Asset.Type}}",
    "AssetName": "{{Activity.Asset.Name}}",
    "AssetId": "{{Activity.Asset.Id}}",
    "SubjectLine": "{{Activity.Field(SubjectLine)}}",
    "EmailWebLink": "{{Activity.Field(EmailWebLink)}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "DeploymentId": "{{Activity.Field(EmailDeploymentId)}}",
    "EmailSendType": "{{Activity.Field(EmailSendType)}}",
    "EmailAddress": "{{Activity.Field(EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}",
    "CampaignResponseDate": "{{Activity.CampaignResponse.CreatedAt}}",
    "CampaignResponseMemberStatus": "{{Activity.CampaignResponse.Field(MemberStatus)}}"
  }
}

Response body:

{
  "name": "Bulk Activity Export - Email Send",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "EmailRecipientId": "{{Activity.Field(EmailRecipientId)}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "AssetType": "{{Activity.Asset.Type}}",
    "AssetName": "{{Activity.Asset.Name}}",
    "AssetId": "{{Activity.Asset.Id}}",
    "SubjectLine": "{{Activity.Field(SubjectLine)}}",
    "EmailWebLink": "{{Activity.Field(EmailWebLink)}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "DeploymentId": "{{Activity.Field(EmailDeploymentId)}}",
    "EmailSendType": "{{Activity.Field(EmailSendType)}}",
    "EmailAddress": "{{Activity.Field(EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}",
    "CampaignResponseDate": "{{Activity.CampaignResponse.CreatedAt}}",
    "CampaignResponseMemberStatus": "{{Activity.CampaignResponse.Field(MemberStatus)}}"
  },
  "filter": "'{{Activity.Type}}'='EmailSend'",
  "dataRetentionDuration": "PT12H",
  "uri": "/activities/exports/67",
  "createdBy": "API.User",
  "createdAt": "2018-07-17T17:46:28.9274083Z",
  "updatedBy": "API.User",
  "updatedAt": "2018-07-17T17:46:28.9274083Z"
}

Form submit

Request:

POST /activities/exports

Request body:

{
  "filter": "'{{Activity.Type}}'='FormSubmit'",
  "name": "Bulk Activity Export - Form Submit",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "VisitorId": "{{Activity.Visitor.Id}}",
    "VisitorExternalId": "{{Activity.Visitor.ExternalId}}",
    "AssetType": "{{Activity.Asset.Type}}",
    "AssetName": "{{Activity.Asset.Name}}",
    "AssetId": "{{Activity.Asset.Id}}",
    "RawData": "{{Activity.Field(RawData)}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "EmailAddress": "{{Activity.Contact.Field(C_EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}",
    "CampaignResponseDate": "{{Activity.CampaignResponse.CreatedAt}}",
    "CampaignResponseMemberStatus": "{{Activity.CampaignResponse.Field(MemberStatus)}}"
  }
}

Response body:

{
  "name": "Bulk Activity Export - Form Submit",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "VisitorId": "{{Activity.Visitor.Id}}",
    "VisitorExternalId": "{{Activity.Visitor.ExternalId}}",
    "AssetType": "{{Activity.Asset.Type}}",
    "AssetName": "{{Activity.Asset.Name}}",
    "AssetId": "{{Activity.Asset.Id}}",
    "RawData": "{{Activity.Field(RawData)}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "EmailAddress": "{{Activity.Contact.Field(C_EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}",
    "CampaignResponseDate": "{{Activity.CampaignResponse.CreatedAt}}",
    "CampaignResponseMemberStatus": "{{Activity.CampaignResponse.Field(MemberStatus)}}"
  },
  "filter": "'{{Activity.Type}}'='FormSubmit'",
  "dataRetentionDuration": "PT12H",
  "uri": "/activities/exports/68",
  "createdBy": "API.User",
  "createdAt": "2018-07-17T17:51:21.6851479Z",
  "updatedBy": "API.User",
  "updatedAt": "2018-07-17T17:51:21.6851479Z"
}

Page view

Request:

POST /activities/exports

Request body:

{
  "filter": "'{{Activity.Type}}'='PageView'",
  "name": "Bulk Activity Export - Page View",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "VisitorId": "{{Activity.Visitor.Id}}",
    "VisitorExternalId": "{{Activity.Visitor.ExternalId}}",
    "WebVisitId": "{{Activity.Field(WebVisitId)}}",
    "Url": "{{Activity.Field(Url)}}",
    "ReferrerUrl": "{{Activity.Field(ReferrerUrl)}}",
    "IpAddress": "{{Activity.Field(IpAddress)}}",
    "IsWebTrackingOptedIn": "{{Activity.Field(IsWebTrackingOptedIn)}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "EmailAddress": "{{Activity.Contact.Field(C_EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}",
    "LinkedToContactDate": "{{Activity.Field(LinkedToContactDate)}}",
    "PageViewSavedId": "{{Activity.Field(PageViewSavedId)}}",
    "CampaignResponseDate": "{{Activity.CampaignResponse.CreatedAt}}",
    "CampaignResponseMemberStatus": "{{Activity.CampaignResponse.Field(MemberStatus)}}"
  }
}

Response body:

{
  "name": "Bulk Activity Export - Page View",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "VisitorId": "{{Activity.Visitor.Id}}",
    "VisitorExternalId": "{{Activity.Visitor.ExternalId}}",
    "WebVisitId": "{{Activity.Field(WebVisitId)}}",
    "Url": "{{Activity.Field(Url)}}",
    "ReferrerUrl": "{{Activity.Field(ReferrerUrl)}}",
    "IpAddress": "{{Activity.Field(IpAddress)}}",
    "IsWebTrackingOptedIn": "{{Activity.Field(IsWebTrackingOptedIn)}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "EmailAddress": "{{Activity.Contact.Field(C_EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}",
    "LinkedToContactDate": "{{Activity.Field(LinkedToContactDate)}}",
    "CampaignResponseDate": "{{Activity.CampaignResponse.CreatedAt}}",
    "CampaignResponseMemberStatus": "{{Activity.CampaignResponse.Field(MemberStatus)}}"
  },
  "filter": "'{{Activity.Type}}'='PageView'",
  "dataRetentionDuration": "PT12H",
  "uri": "/activities/exports/69",
  "createdBy": "API.User",
  "createdAt": "2018-07-17T17:54:06.3563512Z",
  "updatedBy": "API.User",
  "updatedAt": "2018-07-17T17:54:06.3563512Z"
}

Subscribe

Request:

POST /activities/exports

Request body:

{
  "filter": "'{{Activity.Type}}'='Subscribe'",
  "name": "Bulk Activity Export - Subscribe",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "EmailRecipientId": "{{Activity.Field(EmailRecipientId)}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "AssetType": "{{Activity.Asset.Type}}",
    "AssetName": "{{Activity.Asset.Name}}",
    "AssetId": "{{Activity.Asset.Id}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "EmailAddress": "{{Activity.Field(EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}"
  }
}

Response body:

{
  "name": "Bulk Activity Export - Subscribe",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "EmailRecipientId": "{{Activity.Field(EmailRecipientId)}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "AssetType": "{{Activity.Asset.Type}}",
    "AssetName": "{{Activity.Asset.Name}}",
    "AssetId": "{{Activity.Asset.Id}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "EmailAddress": "{{Activity.Field(EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}"
  },
  "filter": "'{{Activity.Type}}'='Subscribe'",
  "dataRetentionDuration": "PT12H",
  "uri": "/activities/exports/74",
  "createdBy": "API.User",
  "createdAt": "2018-09-20T13:38:55.5560961Z",
  "updatedBy": "API.User",
  "updatedAt": "2018-09-20T13:38:55.5560961Z"
}

Unsubscribe

Request:

POST /activities/exports

Request body:

{
  "filter": "'{{Activity.Type}}'='Unsubscribe'",
  "name": "Bulk Activity Export - Unsubscribe",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "EmailRecipientId": "{{Activity.Field(EmailRecipientId)}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "AssetType": "{{Activity.Asset.Type}}",
    "AssetName": "{{Activity.Asset.Name}}",
    "AssetId": "{{Activity.Asset.Id}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "EmailAddress": "{{Activity.Field(EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}"
  }
}

Response body:

{
  "name": "Bulk Activity Export - Unsubscribe",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "EmailRecipientId": "{{Activity.Field(EmailRecipientId)}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "AssetType": "{{Activity.Asset.Type}}",
    "AssetName": "{{Activity.Asset.Name}}",
    "AssetId": "{{Activity.Asset.Id}}",
    "CampaignId": "{{Activity.Campaign.Id}}",
    "CRMCampaignId": "{{Activity.Campaign.Field(CRMCampaignId)}}",
    "CampaignName": "{{Activity.Campaign.Field(CampaignName)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "EmailAddress": "{{Activity.Field(EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}"
  },
  "filter": "'{{Activity.Type}}'='Unsubscribe'",
  "dataRetentionDuration": "PT12H",
  "uri": "/activities/exports/75",
  "createdBy": "API.User",
  "createdAt": "2018-09-20T13:42:03.4178334Z",
  "updatedBy": "API.User",
  "updatedAt": "2018-09-20T13:42:03.4178334Z"
}

Web visit

Request:

POST /activities/exports

Request body:

{
  "filter": "'{{Activity.Type}}'='WebVisit'",
  "name": "Bulk Activity Export - Web Visit",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "VisitorId": "{{Activity.Visitor.Id}}",
    "VisitorExternalId": "{{Activity.Visitor.ExternalId}}",
    "ReferrerUrl": "{{Activity.Field(ReferrerUrl)}}",
    "IpAddress": "{{Activity.Field(IpAddress)}}",
    "NumberOfPages": "{{Activity.Field(NumberOfPages)}}",
    "FirstPageViewUrl": "{{Activity.Field(FirstPageViewUrl)}}",
    "Duration": "{{Activity.Field(Duration)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "EmailAddress": "{{Activity.Contact.Field(C_EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}",
    "LinkedToContactDate": "{{Activity.Field(LinkedToContactDate)}}",
    "WebVisitSavedId": "{{Activity.Field(WebVisitSavedId)}}"
  }
}

Response body:

{
  "name": "Bulk Activity Export - Web Visit",
  "fields": {
    "ActivityId": "{{Activity.Id}}",
    "ActivityType": "{{Activity.Type}}",
    "ActivityDate": "{{Activity.CreatedAt}}",
    "ContactId": "{{Activity.Contact.Id}}",
    "VisitorId": "{{Activity.Visitor.Id}}",
    "VisitorExternalId": "{{Activity.Visitor.ExternalId}}",
    "ReferrerUrl": "{{Activity.Field(ReferrerUrl)}}",
    "IpAddress": "{{Activity.Field(IpAddress)}}",
    "NumberOfPages": "{{Activity.Field(NumberOfPages)}}",
    "FirstPageViewUrl": "{{Activity.Field(FirstPageViewUrl)}}",
    "Duration": "{{Activity.Field(Duration)}}",
    "ExternalId": "{{Activity.ExternalId}}",
    "EmailAddress": "{{Activity.Contact.Field(C_EmailAddress)}}",
    "ContactIdExt": "{{Activity.Contact.Field(ContactIDExt)}}",
    "LinkedToContactDate": "{{Activity.Field(LinkedToContactDate)}}",
    "WebVisitSavedId": "{{Activity.Field(WebVisitSavedId)}}"
  },
  "filter": "'{{Activity.Type}}'='WebVisit'",
  "dataRetentionDuration": "PT12H",
  "uri": "/activities/exports/39",
  "createdBy": "API.User",
  "createdAt": "2017-08-09T16:14:57.0142347Z",
  "updatedBy": "API.User",
  "updatedAt": "2017-08-09T16:14:57.0142347Z"
}