---
title: "Create Data Export Task"
method: POST
path: "/team-messaging/v1/data-export"
tags: ["Compliance Exports"]
---

# Create Data Export Task

`POST /team-messaging/v1/data-export`

Creates a task for Glip data export and returns a link at which the exported data will be available in future once the task is implemented. The exported data can be downloaded by calling Get Data Export Task method with the specified task ID. Simultaneously no more than 2 tasks per company can be created.

## Request body

- CreateDataExportTaskRequest
  - `timeFrom` string, date-time — Starting time for data collection. The default value is `timeTo` minus 24 hours. Max allowed time frame between `timeFrom` and `timeTo` is 6 months
  - `timeTo` string, date-time — Ending time for data collection. The default value is current time. Max allowed time frame between `timeFrom` and `timeTo` is 6 months
  - `contacts` DataExportTaskContactInfo[] — List of contacts which data is collected. The following data will be exported: posts, tasks, events, etc. posted by the user(s); posts addressing the user(s) via direct and @Mentions; tasks assigned to the listed user(s). The list of 30 users per request is supported.
    - `id` string — Internal identifier of a contact
    - `email` string, email — Email address of a contact
  - `chatIds` string[] — List of chats from which the data (posts, files, tasks, events, notes, etc.) will be collected. Maximum number of chats supported is 10

## Response `202`

The task is accepted

- DataExportTask
  - `uri` string — Canonical URI of a task
  - `id` string — Internal identifier of a task
  - `creationTime` string, date-time — Task creation timestamp
  - `lastModifiedTime` string, date-time — Task last modification timestamp
  - `status` 'Accepted' | 'InProgress' | 'Completed' | 'Failed' | 'Expired' — Task status
  - `creator` CreatorInfo — Task creator information
    - `id` string — Internal identifier of a user
    - `firstName` string — First name of a user
    - `lastName` string — Last name of a user
  - `specific` SpecificInfo — Information specified in request
    - `timeFrom` string, date-time — Starting time for data collection
    - `timeTo` string, date-time — Ending time for data collection
    - `contacts` DataExportTaskContactInfo[]
      - `id` string — Internal identifier of a contact
      - `email` string, email — Email address of a contact
    - `chatIds` string[] — List of chats from which the data (posts, files, tasks, events, notes, etc.) will be collected
  - `datasets` ExportTaskResultInfo[] — Data collection archives. Returned by task ID
    - `id` string — Internal identifier of a dataset
    - `uri` string, uri — Link for downloading a dataset
    - `size` integer — Size of ta dataset in bytes

---

[API](https://skmtc.net/ringcentral/apis/ringcentral-api.md) · [All operations](https://skmtc.net/ringcentral/apis/ringcentral-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ringcentral/ringcentral-api/revisions/8d602198ec97/schema)
