Start Import
    • Dark
      Light
    • PDF

    Start Import

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/startImport

    Triggers the process of importing users, rooms and messages to the workspace. Permission required: run-import

    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
    {
      "input": {
        "users": [
          {
            "user_id": "testbh",
            "username": "testbh",
            "email": "[email protected]",
            "is_deleted": false,
            "is_bot": false,
            "do_import": true,
            "is_email_taken": false
          }
        ],
        "channels": [
          {
            "channel_id": "WDuJLFkjwk6L7LdFC",
            "name": "dlp",
            "is_archived": false,
            "do_import": true,
            "is_private": false,
            "is_direct": false
          }
        ]
      }
    }
    Expand All
    object
    input
    object Required

    The input object contains two arrays: users and channels.

    users
    Array of object Required
    object
    user_id
    string Required

    The unique user identifier (which is the username, since the user may not have a proper _id yet).

    Examplebradley.hilton
    username
    string Required

    The user name.

    Examplebradley.hilton
    email
    string Required

    The user's email address.

    is_deleted
    boolean Required

    Was the described user deleted?

    is_bot
    boolean Required

    Is the described user a bot?

    do_import
    boolean Required

    Should the described user be imported?

    is_email_taken
    boolean Required

    Is there an existing user with the same email?

    channels
    Array of object Required
    object
    channel_id
    string Required

    The unique room identifier.

    Example4K2ovcvP5LqfxXnd5
    name
    string Required

    The name of the room.

    ExamplenewRoom
    is_archived
    boolean Required

    Is the described room archived?

    do_import
    boolean Required

    Should the described room be imported?

    is_private
    boolean Required

    Is the described room private?

    is_direct
    boolean Required

    Is the described room of type Direct Messages?

    creator
    string

    The identifier of the room owner.

    Default"undefined"
    ExampleMF72rfNWNcv9EFZsx
    Responses
    200

    OK

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

    Unauthorized

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

    Forbidden

    Permission Error
    {
      "success": false,
      "error": "User does not have the permissions required for this action [error-unauthorized]"
    }
    object
    success
    boolean
    error
    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.