Register

To register a data export request, use the below API. The data export request will be processed asynchronously.

info

{api-base-url} can be obtained from the MirrorFly console.

HTTP request#

curl -X POST "https://{api-base-url}/api/v1/chat/download/request"
-H "Authorization: xxxxxxxxxxxxxxxxxx"
-d "chatType=":chatType""
-d "exportType=":exportType""
-d "licenseKey=":licenseKey""
-d "startDate=":startDate""
-d "endDate=":endDate""

Request Params#

ParamDataTypeRequiredDescription
chatTypeStringNoType of chat to export. Single, Group, and All are all possible values. The default value is All. chatType = All, downloads separate files for single, group chats.
exportTypeStringYesExportable file type. csv and json are potential values.
licenseKeyStringYesThe license key that will be used to retrieve the data.
startDateStringYesBeginning date for data export. Date must come before or be the same as endDate. Dates in the form dd/MM/yyyy are permitted.
endDateStringYesEnd date for data export. Date must be greater than or equal to startDate. Dates in the form dd/MM/yyyy are permitted.

Responses#

If successful, this action registers a data export request.

{
"status": 200,
"data": {
"requestId": "54bf4bcc-e000-4682-9ef7-6ead5a697bb2", // String - ID for data export request processing. This can be used to check the status of data export request.
},
"message": "Request registered successfully." // String - Message describing the response to the data export registration request
}

Error#

In the case of an error, an error object like below is returned.

When the token passed in Headers is expired

{
"status": 401,
"message": "Token Expired"
}

In the case of a Bad Request, an error message is returned

{
"status": 400,
"message": "Error Message"
}