Autocomplete Room Name for Private and Public Rooms
    • Dark
      Light
    • PDF

    Autocomplete Room Name for Private and Public Rooms

    • Dark
      Light
    • PDF

    Article summary

    Get
    /api/v1/rooms.autocomplete.channelAndPrivate

    List the public and private rooms whose names match a given string, excluding discussions, DMs, and omnichannel rooms. The endpoint is valuable when performing search operations. It returns only rooms that the user belongs to.

    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Query parameters
    selector
    stringRequired

    The term to be completed. It only applies to room name.

    Example{"name":"ran"}
    Responses
    200

    OK

    Success
    {
      "items": [
        {
          "_id": "664f0d525df46832f75b1860",
          "fname": "rancher",
          "name": "rancher",
          "t": "p"
        },
        {
          "_id": "6630e94ad2226209149c67e2",
          "fname": "random",
          "name": "random",
          "t": "c"
        },
        {
          "_id": "664f148f5df46832f75b18b2",
          "fname": "ranmowe",
          "name": "ranmowe",
          "t": "p"
        }
      ],
      "success": true
    }
    Expand All
    object
    items
    Array of object
    object
    _id
    string
    fname
    string
    name
    string
    t
    string
    success
    boolean
    400

    Bad Request

    Selector Param Required
    {
      "success": false,
      "error": "The 'selector' param is required"
    }
    object
    success
    boolean
    error
    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.