---
title: "Register an interaction data export task"
slug: "register-an-interaction-data-export-task"
abstract: "How to register interaction data export tasks with the xConnect data export tool Web API."
---
# Register an interaction data export task

You can use the [xConnect Web API](https://doc.sitecore.com/xp/en/developers/104/sitecore-experience-platform/web-api-for-xconnect-data-tools.html "Web API for xConnect Data Tools") to export interaction data. To do this, you must register a data export task.

To register an interaction data export task:

- Use the following API:

    ```xml
    <instance>/sitecore/api/datatools/export/tasks/interactions
    ```

    The successful task registration request returns the task ID used for status monitoring, for example:

    ```json
    {
        "TaskId": "049cd8b3-b120-4949-a42f-cdc2fe4f3086"
    }
    ```

<details>
<summary><h2>Parameters</h2></summary>

The following describes the POST parameters that you can send to the Web API to register an interaction data export task:

| Parameter | Optional | Default value | Type | Description |
| --- | --- | --- | --- | --- |
| `BatchSize` | Yes | 100 | Integer | The data extraction batch size of contacts<br><br>The `BatchSize` system parameter controls the amount of data extracted from the collection database for each cursor read. |
| `DefaultSplitItemCount` | Yes | 100 | Integer | Contact data extraction cursor split count.<br><br>The `DefaultSplitItemCount` system parameter controls the split process of contact data extraction. |
| `ExpiresAfterHours` | Yes | 24 | Integer | The expiration of the task in the final state.<br><br>The final task status is either successful or failed and removed from the system after the expiration period. |
| `StorageProfile` | No | - | String | The name of a profile with predefined storage provider settin (such as network folder location or storage account connection string). The storage profile must be registered in the Cortex Processing Engine, otherwise Sitecore does not register the task and the `ModelValidationException` error is thrown. |
| `StartedDaysCutoff` | Yes | Null | Nullable<br><br>Integer | Minimum number of days since the contact started the interaction with the brand.<br><br>The data extraction process uses this parameter to filter contacts based on the `StartDateTime` value. The `StartDateTime` date-time reflects the starting date of the interaction. Interactions that started less than `StartedDaysCutOff` days ago are not included in the data export. |
| `StartPercentile` | Yes | Null | Nullable double | The start sampling range value. The range restriction is 0 to 1.<br><br>The percentile range specifies the subset of data to extract. Use this parameter to perform the purging in small batches to avoid stressing the system too much.<br><br>The data extraction process filters contacts based on the percentile range and the `CutOffDays` parameter. |
| `EndPercentile` | Yes | Null | Nullable double | The end sampling range value. The range restriction is 0 to 1.<br><br>The percentile range specifies the subset of data to extract. Use this parameter to perform the purging in small batches to avoid stressing the system too much.<br><br>The data extraction process filters contacts based on the percentile range and the `CutOffDays` parameter. |

</details>