Clear Room History
    • Dark
      Light
    • PDF

    Clear Room History

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/rooms.cleanHistory

    Cleans up a room, removing messages from the provided time range.

    Changelog

    VersionDescription
    0.64.0Added
    0.67.0Added fields limit, excludePinned, filesOnly and users
    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Body parameters
    Example 1
    {
      "roomId": "roomId",
      "latest": "2016-12-09T13:42:25.304Z",
      "oldest": "2016-08-30T13:42:25.304Z"
    }
    object
    roomId
    string Required

    The room ID.

    latest
    string Required

    The end of time range of messages.

    oldest
    string Required

    The start of the time range of messages.

    inclusive
    boolean

    Whether messages which land on the latest and oldest dates should be included. By default, the value is false.

    excludePinned
    boolean

    Whether pinned messages should be deleted. By default, the value is false.

    filesOnly
    boolean

    Whether to only delete files and keep messages intact. By default, the value is false.

    users
    Array of string

    Specific set of users whose content to delete. By default, the value is [], that is, everyone.

    string
    limit
    integer

    The amount of messages to prune. By default, the value is 0 (all).

    ignoreDiscussion
    boolean

    Determines if messages from discussions should be pruned. By default, the value is true.

    ignoreThreads
    boolean

    Determines if messages from threads should be pruned. By default, the value is true.

    Responses
    200

    OK

    Success
    {
      "success": true
    }
    object
    success
    boolean

    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.