Upload Import File
    • Dark
      Light
    • PDF

    Upload Import File

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/uploadImportFile

    This endpoint takes in the binary content of the imported file, along with additional information about its content, and stores it in a buffer.

    Changelog

    VersionDescription
    3.0.0Added
    Header parameters
    X-User-Id
    stringRequired

    The user ID.

    ExampleCkCPNctrgCDfmWLqC
    X-Auth-Token
    stringRequired

    The authentication token.

    Example1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE
    Body parameters
    Example
    {
      "binaryContent": "/testfile.csv",
      "importerKey": "csv",
      "fileName": "Testfile",
      "contentType": "text/csv"
    }
    object
    binaryContent
    string Required

    The uploaded file.

    importerKey
    string Required

    It indicates how Rocket.Chat should handle the uploaded file. The accepted importer keys are:

    • csv
    • hipchatenterprise
    • pending-avatars
    • pending-files
    • slack
    • slack-users
    fileName
    string Required

    The name of the file to be imported.

    contentType
    string Required

    The imported file MIME type.

    Responses
    200

    OK

    Success
    {
      "success": true
    }
    object
    success
    boolean
    400

    Bad Request

    Importer not Defined
    {
      "success": false,
      "error": "The importer (png) has no import class defined. [error-importer-not-defined]",
      "errorType": "error-importer-not-defined",
      "details": "uploadImportFile"
    }
    object
    success
    boolean
    error
    string
    errorType
    string
    details
    string
    401

    Unauthorized

    Authorization Error
    {
      "status": "error",
      "message": "You must be logged in to do this."
    }
    object
    status
    string
    message
    string

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.