Delete Chat Message
    • Dark
      Light
    • PDF

    Delete Chat Message

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/chat.delete

    Delete a chat message.

    Changelog

    VersionDescription
    0.48.0Added
    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": "ByehQjC44FwMeiLbX",
      "msgId": "7aDSXtjMA3KPLxLjt",
      "asUser": false
    }
    object
    roomId
    string Required

    The room ID

    msgId
    string Required

    The message ID

    asUser
    boolean

    Should the message be deleted as the user who sent it? It is false by default.

    Responses
    200

    OK

    Example 1
    {
      "_id": "jEnjsxuoDJamGjbH2",
      "ts": "1696533809813",
      "message": {
        "_id": "jEnjsxuoDJamGjbH2",
        "rid": "6GFJ3tbmHiyHbahmC",
        "u": {
          "_id": "5fRTXMt7DMJbpPJfh",
          "username": "test.test",
          "name": "Testtest"
        }
      },
      "success": true
    }
    Expand All
    object
    _id
    string
    ts
    string
    message
    object
    _id
    string
    rid
    string
    u
    object
    _id
    string
    username
    string
    name
    string
    success
    boolean
    400

    Bad Request

    Example 1
    {
      "success": false,
      "error": "The room id provided does not match where the message is from."
    }
    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.