Migrate Data

To migrate your existing chat data to our system you can use the below API.

info

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

Prerequisites#

To migrate all your existing customers data to our platform, follow the below instructions:

  1. Register the users of your old application to MirrorFly application. You can refer this.
  2. Create groups to migrate the group messages of your old application to MirrorFly application. You can refer this.
  3. Please prepare the data you want to migrate in csv file as this.

HTTP request#

curl -X POST "https://{api-base-url}/api/v1/chat/migration/fileupload"
-H "accept: */*"
-H "Authorization: AuthToken"
-H "Content-Type: multipart/form-data"
-F "file=@":file""

Request Params#

ParamDataTypeRequiredDescription
fileFileYesCSV file containing data to be migrated

Responses#

If successful, this action returns below response, in the response body.

{
"status": 200,
"data": {
"fileToken": "xxxxxxxxx", // String - Message Id of the message sent
"fileRowsCount": 0, // Number indicating the no.of rows in file (excluding header & empty rows)
},
"message": "File uploaded successfully"
}

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"
}