Skip to main content
POST
/
fileimports
/
import
/
status
curl --request POST \
  --url https://fileimports-data-api-0{dc}.moengage.com/v1.0/data/fileimports/import/status \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'MOE-APPKEY: <moe-appkey>' \
  --data '
{
  "import_name": "test_import",
  "import_type": [
    "USERS",
    "EVENTS",
    "AUX_DATA"
  ],
  "date": {
    "start_date": "14/11/2024",
    "end_date": "14/11/2024",
    "format": "DD/MM/YYYY"
  },
  "schedule_type": [
    "PERIODIC",
    "ONETIME"
  ],
  "file_source": [
    "SFTP",
    "S3",
    "CSV"
  ],
  "schedule_status": [
    "SUCCESSFUL",
    "FAILED",
    "PARTIAL_SUCCESS",
    "SCHEDULED",
    "PROCESSING",
    "QUEUED",
    "ARCHIVED"
  ],
  "offset": "1"
}
'
{
"status": "success",
"total_count": 1,
"data": [
{
"id": "672561rr0abd2da34cf7f7df",
"file_name": "filename.csv",
"scheduled_at": "2024-11-14T12:31:31.713000",
"completed_at": "2024-11-14T12:32:09.942000",
"type": "AUX_DATA",
"file_size": "1544",
"file_status": "SUCCESSFUL",
"status_msg": "",
"total_rows": 10,
"skipped_rows": 0,
"updated_rows": 0,
"failed_rows": 0,
"aux_data_added_count": 10,
"aux_data_failed_count": 0,
"added_rows": 10
}
],
"offset": 1,
"more_files": false
}

Rate Limit

You can create 50 requests per minute.

Authorizations

Authorization
string
header
required

Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format 'username:password'.

  • Username: Use your MoEngage workspace ID (also known as the App ID). You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
  • Password: Use your API Key, which you can find within the Data tile.

Note: After you generate and save the Data API Key, DO NOT generate a new key unless there is a security breach. After you generate a different Data API key and save it, the authentication will start failing. You must update your existing data tracking.

For more information on authentication and getting your credentials, refer here.

Headers

MOE-APPKEY
string
required

This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).

Body

application/json
import_type
enum<string>

This field denotes the type of data to be imported.

Available options:
USERS,
EVENTS,
AUX_DATA
date
object

This field denotes the file processing date. Supported values are:

  • start_date
  • end_date
  • format

If this field is not passed, the API will respond with details of all the files corresponding to the import_id or import_name passed and in accordance to the offset and limit values.

Supported date time formats are:

  • "datetime_format": "YYYY-MM-DD" (2022-01-22)
  • "datetime_format": "YYYY/MM/DD" (2022/01/22)
  • "datetime_format": "DD/MM/YYYY" (22/01/2022)
  • "datetime_format": "DD-MM-YYYY" (22-01-2022)
  • "datetime_format": "DD-MM-YYYY hh:mm:ss" (31-12-2022 12:10:33)
  • "datetime_format": "DD/MM/YYYY hh:mm:ss" (31/12/2022 12:10:33)
  • "datetime_format": "YYYY-MM-DD hh:mm:ss" (2019-02-22 17:54:14)
  • "datetime_format": "YYYY/MM/DD hh:mm:ss" (2019/02/22 17:54:14)
schedule_type
enum<string>

This field denotes the type of import schedule.

Available options:
PERIODIC,
ONETIME
file_source
enum<string>

This field denotes the file source of the import.

Available options:
SFTP,
S3,
CSV
schedule_status
enum<string>

This field denotes the import schedule status.

  • PARTIAL_SUCCESS is displayed when all rows in the files are not processed successfully.
  • QUEUED is displayed when the import is queued to be processed next.
  • ARCHIVED is displayed when the import is archived.
Available options:
SUCCESSFUL,
FAILED,
PARTIAL_SUCCESS,
SCHEDULED,
PROCESSING,
QUEUED,
ARCHIVED
import_name
string

This field denotes the name of the import.

offset
integer
default:1

'API responds with a maximum of 50 file details in a single response. For example, if there are a total of 150 files that are part of the API response, then:

  • Offset = 1 will fetch the details of the first 50 files
  • Offset = 2 will fetch the file details of the next 50 imports
  • Offset = 3 will fetch the import details of the last 50 imports
  • If offset is not passed in the request body, the API response will consider offset = 1.

You can refer to the total_count parameter in the response to understand how many total files are part of the response.

OR

If the API responds with more_files = true, it indicates that there are more files that are not part of the current response for which another API request must be made with offset +1.'

Response

Success.

status
string

This field denotes the status of the API response.

Example:

"success"

total_count
integer

This field denotes the total count of the imports in the response.

Example:

1

data
object[]

This field contains the import data details.

offset
integer

This field denotes the pagination value of the imports. For example, if there are 100 imports to be fetched in the response:

  • Offset = 1 will return the first 50 imports
  • Offset = 2 will return the next 50 import details
more_files
string

This field indicates if there are more files. For example, if there are 100 imports and offset = 1, 50 imports will be returned with more_file = true to indicate that offset = 2 must be passed to get the next 50 imports.