> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigger File Imports

> This API triggers scheduled file imports. You can trigger periodic imports to run using this API if the import has not expired and is in any of the following states- Scheduled, Successful, Partially Successful, and Failed.

#### Rate Limit

You can trigger this API once in every five minutes for a specific schedule\_id. A Bad request response (400) response will be sent if this is exceeded.


## OpenAPI

````yaml /api/data/data.yaml post /fileimports/trigger/{schedule_id}
openapi: 3.0.3
info:
  title: MoEngage Data APIs
  version: '1.0'
  description: >-
    This is a comprehensive OpenAPI specification for MoEngage's Data APIs,
    including User, Event, and Device management.

    It's designed to power an interactive API playground on your new
    documentation site.
servers:
  - url: https://api-{dc}.moengage.com/v1
    description: MoEngage Core API Server
    variables:
      dc:
        default: '01'
        description: >-
          The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center
          (DC). MoEngage hosts each customer in a different DC. You can find
          your DC number and replace the value of ‘dc’ in the URL by referring
          to the DC and API endpoint mapping
          [here](/api/introduction#data-centers). Your MoEngage Data Center (DC)
          can be 01, 02, 03, 04, 05, 06, or 101. 
security:
  - Authentication: []
tags:
  - name: User
    description: Operations for creating, updating, retrieving, and managing user profiles.
  - name: Event
    description: Operations for tracking user events.
  - name: Device
    description: Operations for managing user devices.
  - name: Tracking
    description: Endpoints for tracking attribution and installs.
  - name: Utilities
    description: Utility endpoints for testing connections.
  - name: File Imports
    description: Operations for managing asynchronous file imports.
  - name: Bulk
    description: Operations for importing users and events in bulk.
  - name: Webhooks
    description: Incoming webhook specifications from MoEngage.
paths:
  /fileimports/trigger/{schedule_id}:
    post:
      tags:
        - File Import
      summary: Trigger File Imports
      description: >-
        This API triggers scheduled file imports. You can trigger periodic
        imports to run using this API if the import has not expired and is in
        any of the following states- Scheduled, Successful, Partially
        Successful, and Failed.
      parameters:
        - name: schedule_id
          in: path
          required: true
          description: >-
            This field specifies the Import ID (the unique identifier for the
            import) of the import that needs to be triggered. You can find the
            Import ID in the MoEngage Dashboard on the Imports History page.
            Click **Actions** > **View import** to view the Import Details. You
            can also view the Import ID in the email notification received once
            the import has been set up.
          schema:
            type: string
        - name: MOE-APPKEY
          in: header
          required: true
          description: >-
            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)**.
          schema:
            type: string
      responses:
        '200':
          description: >-
            This response is returned when the request is processed
            successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      This field contains the status of the request and
                      specifies whether the request was successful.
                    example: success, failure
                  message:
                    type: string
                    description: >-
                      This field contains information about whether the request
                      was successful or not.
                    example: Trigger Import Successful
              examples:
                success_response:
                  summary: Successful request
                  value:
                    status: success
                    message: Triggered Import Successfully
        '400':
          description: >-
            This response is returned when the Import ID/Schedule ID is missing
            from the request or when the provided parameters are invalid. Also,
            this response is returned when the rate limit (one request in five
            minutes) is breached.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                    description: >-
                      This field contains the status of the request and
                      specifies whether the request was successful.
                  error_type:
                    type: object
                    description: >-
                      This field is present in the response when the
                      Import/Schedule ID in the request is not found in the
                      system (either because it is invalid or has been deleted).
                  message:
                    type: string
                    description: >-
                      This field contains information about whether the request
                      was successful or not. 
              examples:
                invalid_scheduleid:
                  summary: The Import ID (Schedule ID) in the Request is Invalid
                  value:
                    status: fail
                    error_type: NOT_FOUND
                    message: This import is either deleted or expired.
                exceeded_user_limit:
                  summary: The Number of Users Exceeds the Allowed Limit in the Request
                  value:
                    status: fail
                    error_type: ALREADY_EXISTS
                    message: Import has run in the last 5 min.
        '401':
          description: >-
            This response is returned when the APP Key is invalid or missing,
            the password is incorrect, or there are other such
            authorization-related errors in the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  title:
                    type: string
                    example: fail
                    description: >-
                      This field is present in the response in the case of
                      errors and contains the type of error.
                  description:
                    type: string
                    description: >-
                      This field is present in the response in the case of
                      errors and contains the error description.
              examples:
                incorrect_password:
                  summary: Incorrect Password in the Header
                  value:
                    title: AuthenticationInvalid
                    description: >-
                      Password (APP_KEY) doesn't match the one available on the
                      dashboard. Kindly ensure the same APP_KEY available on the
                      dashboard is used.
                missing_authorization_key:
                  summary: Missing Authorization Key in the Header
                  value:
                    title: HeaderMissing
                    description: MOE-APPKEY is missing in Header
                header_mismatch:
                  summary: APP Key Mismatch in the Header
                  value:
                    title: HeaderMismatch
                    description: >-
                      MOE_APPKEY doesn't match the Username (APP_KEY) used in
                      Basic Auth authorization
        '403':
          description: >-
            This response is returned when your MoEngage account has been
            blocked or suspended.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: >-
                          This field contains information about whether the
                          request was successful or not.
                      type:
                        type: string
                        description: >-
                          This field is present in the response in the case of
                          403 errors and contains the error type.
                      request_id:
                        type: string
                        description: >-
                          This field is present in the response in the case of
                          403 errors and contains the request-id.
              examples:
                account_blocked:
                  summary: Your Account is Blocked
                  value:
                    status: fail
                    error:
                      message: Your account is suspended. Please contact MoEngage team.
                      type: BlockedClient
                      request_id: ofHUEaEQ
        '404':
          description: >-
            This response is returned when the request contains the incorrect
            URL (when you try to access a resource that is not present).
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                    description: >-
                      This field contains the status of the request and
                      specifies whether the request was successful.
                  message:
                    type: string
                    description: >-
                      This field contains information about whether the request
                      was successful or not.
              examples:
                missing_resource:
                  summary: Resource Not Found Error
                  value:
                    status: fail
                    message: Resource not found
        '405':
          description: >-
            This response is returned when the request contains an unsupported
            method. For example, if you were to use the GET method instead of
            POST for this request, you would result in a 405 error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                    description: >-
                      This field contains the status of the request and
                      specifies whether the request was successful.
                  message:
                    type: string
                    description: >-
                      This field contains information about whether the request
                      was successful or not.
              examples:
                missing_resource:
                  summary: Method Not Allowed Error
                  value:
                    status: fail
                    message: Method not allowed
        '500':
          description: >-
            This response is returned when the system runs into an unexpected
            error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  title:
                    type: string
                    example: fail
                    description: >-
                      This field is present in the response in the case of
                      errors and contains the type of error.
                  description:
                    type: string
                    description: >-
                      This field is present in the response in the case of
                      errors and contains the error description.
                  code:
                    type: string
                    description: >-
                      This field is present in the response in the case of 5xx
                      errors and contains the error code.
              examples:
                unknown_error:
                  summary: Unknown Errors
                  value:
                    title: Server Error
                    description: >-
                      An unexpected error was encountered while processing this
                      request. Please contact MoEngage Team.
                    code: GlQhUzvM
      servers:
        - url: https://fileimports-data-api-{dc}.moengage.com/v1.0/data
          description: MoEngage File Imports API Server
          variables:
            dc:
              default: '01'
              description: >-
                The ‘dc’ in the API Endpoint URL refers to the MoEngage Data
                Center (DC). MoEngage hosts each customer in a different DC. You
                can find your DC number and replace the value of ‘dc’ in the URL
                by referring to the DC and API endpoint mapping
                [here](/api/introduction#data-centers). Your MoEngage Data
                Center (DC) can be 01, 02, 03, 04, 05, 06, or 101.
components:
  securitySchemes:
    Authentication:
      type: http
      scheme: basic
      description: >
        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](https://www.moengage.com/docs/api/introduction#getting-your-credentials).

````