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

# Run Import Operation

> Process the data from the current import operation, creating the users on Rocket.Chat. It requires the current import operation state to be `ready` and it changes the operation state to `importing`. It will return success if the conditions to start the process are met, without waiting for the import to finish.
Permission required: `run-import`

1. If a user can not be imported successfully it'll be flagged but the operation will not stop.
2. If a user's email or username is already in use, it will not be created.
3. Only the users that were imported successfully will be removed from the staging area.

### Changelog
| Version      | Description |
| ---------------- | ------------|
|6.3.0            | Added       |

## OpenAPI

````json POST /api/v1/import.run
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Settings"
  },
  "servers": [
    {
      "url": "https://apiexplorer.support.rocket.chat"
    }
  ],
  "paths": {
    "/api/v1/import.run": {
      "parameters": [],
      "post": {
        "summary": "Run Import Operation",
        "operationId": "post-api-v1-import.run",
        "responses": {
          "200": {
            "$ref": "#/components/responses/trueSuccess"
          },
          "401": {
            "$ref": "#/components/responses/authorizationError"
          },
          "403": {
            "$ref": "#/components/responses/forbiddenError"
          }
        },
        "description": "Process the data from the current import operation, creating the users on Rocket.Chat. It requires the current import operation state to be `ready` and it changes the operation state to `importing`. It will return success if the conditions to start the process are met, without waiting for the import to finish.\nPermission required: `run-import`\n\n1. If a user can not be imported successfully it'll be flagged but the operation will not stop.\n2. If a user's email or username is already in use, it will not be created.\n3. Only the users that were imported successfully will be removed from the staging area.\n\n### Changelog\n| Version      | Description |\n| ---------------- | ------------|\n|6.3.0            | Added       |",
        "parameters": [
          {
            "$ref": "#/components/parameters/X-User-Id"
          },
          {
            "$ref": "#/components/parameters/X-Auth-Token"
          }
        ],
        "tags": [
          "Bulk User Import"
        ]
      }
    }
  },
  "components": {
    "responses": {
      "trueSuccess": {
        "description": "OK",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                }
              }
            },
            "examples": {
              "Success": {
                "value": {
                  "success": "true"
                }
              }
            }
          }
        }
      },
      "authorizationError": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Authorization Error": {
                "value": {
                  "status": "error",
                  "message": "You must be logged in to do this."
                }
              }
            }
          }
        }
      },
      "forbiddenError": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                },
                "error": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Permission Error": {
                "value": {
                  "success": "false",
                  "error": "User does not have the permissions required for this action [error-unauthorized]"
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "X-User-Id": {
        "name": "X-User-Id",
        "in": "header",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "CkCPNctrgCDfmWLqC",
        "description": "The user ID."
      },
      "X-Auth-Token": {
        "name": "X-Auth-Token",
        "in": "header",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE",
        "description": "The authentication token."
      }
    }
  }
}
````

