Documentation Index

Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt

Use this file to discover all available pages before exploring further.

Audit Omnichannel Messages

Prev Next
Post
/api/v1/audit.omnichannelMessages
Premium tag

Searches Omnichannel messages for an audit and records the search in the audit log. This endpoint requires a license that includes the auditing module. Dates use ISO 8601 format. Requests are limited to ten per minute.

This endpoint replaces the deprecated auditGetOmnichannelMessages real-time method, which remains available until 9.0.0.

Permission required:

  • can-audit

Changelog

Version Description
8.8.0 Added
Header parameters
X-User-Id
stringRequired

The user ID.

ExampleCkCPNctrgCDfmWLqC
X-Auth-Token
stringRequired

The authentication token.

Example1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE
Body parameters
Example
{
  "startDate": "2026-08-01T00:00:00Z",
  "endDate": "2026-08-20T23:59:59.999Z",
  "users": [
    "dana.reyes"
  ],
  "msg": "refund",
  "type": "u",
  "visitor": "8f4c2d1e9a7b6c5d3e2f1a0b"
}
object
startDate
string (date-time) Required

The beginning of the period to search, as an ISO date string.

Example2026-08-01T00:00:00Z
endDate
string (date-time) Required

The end of the period to search, as an ISO date string.

Example2026-08-20T23:59:59.999Z
users
Array of string Required

The usernames associated with the audit search.

Example[ "dana.reyes" ]
string
msg
string | null Required

The text to search for in the messages.

Examplerefund
type
string Required

The audit type recorded in the audit log.

Exampleu
visitor
string | null

The ID of the Omnichannel visitor to audit.

Example8f4c2d1e9a7b6c5d3e2f1a0b
agent
string | null

The ID of the Omnichannel agent to audit.

ExamplerbAXPnMktTFbNpwtJ
Responses
200

OK

Success Example
{
  "messages": [
    {
      "_id": "5RQ4SBL3NuZKsqxaF",
      "rid": "pMtJcZDsvKLnGKQ2C",
      "msg": "I would like to request a refund",
      "ts": "2026-08-14T16:02:51.006Z",
      "u": {
        "_id": "8f4c2d1e9a7b6c5d3e2f1a0b",
        "username": "guest-482",
        "name": "Alex Doe"
      }
    }
  ],
  "success": true
}
Expand All
object
messages
Array of object

The Omnichannel messages matching the audit search.

object
_id
string
rid
string
msg
string
ts
string
u
object
_id
string
username
string
name
string
success
boolean
400

Bad Request

object
success
boolean
error
string
errorType
string
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