Skip to API content
TalkLabs API Docs v3
Recipes
POST Chat

Search Event History

This method is still operational but its use should be replaced with Search Events.

POST /api/v3/{appid}/chat/searchevents

This method is still operational but its use should be replaced with Search Events. This will be discontinued March 31, 2021.

This returns displayable messages (for example speech, quote, threadedreply) that are in the active state (not flagged by moderator or logically deleted).

BODY PROPERTIES

  • fromuserid : (optional) Return ony events from the specified user.
  • fromhandle : (optional) Return only events from a user with the specified handle. Exact match, case insensitive.
  • roomid : (optional) Return only events in the specified room.
  • body : (optional) Returns only messages which contain the specified body substring.
  • limit : (optional) Default is 50, maximum is 200. Limits how many items are returned.
  • cursor : (optional) Leave blank to start from the beginning of the result set; provide the value from the previous returned cursor to resume cursoring through the next page of results
  • direction : (optional) Defaults to Backward. Pass forward or backward. Backward is newest to oldest order, forward is oldest to newest order.
  • types : (optional) Default = all. Use this to filter for specific event types.
    • speech
    • quote
    • reply
    • announcement
    • custom
    • reaction
    • action
    • enter
    • exit
    • ad
    • roomopened
    • roomclosed
    • purge
    • remove
    • replace
    • bounce
Request

Parameters

Values in the path and query string.

appid path
string TalkLabs ID required

The TalkLabs application ID assigned to your account.

Example: your-app-id
Request

JSON body

Send as application/json.

fromUserId
string customer-defined

If specified, filters the search to only include messages where the user posting the event has this userid as an exact match

fromHandle
string

If specified, filters the search to only include messages where the user posting the event has this handle as an exact match

types
ChatEventTypes[]
roomId
string TalkLabs ID

If specified, filters the search to only include events from the specified room

body
string

If specified, performs a substring match case insensitive of the body

limit
integer · int32

The maximum number of records to return.

cursor
string

The cursor returned by the previous page.

direction
integer · int32
Request example
{
  "types": [
    "speech",
    "quote",
    "reply"
  ],
  "limit": 10
}
Response

Status codes

Every JSON response uses the API result envelope.

200 OK ApiResult
400 Bad Request ApiResult
403 Forbidden ApiResult
404 Not Found ApiResult
500 Internal Server Error ApiResult
Search all 118 endpoints Try “join room”, “moderate”, or “POST”.
Request environment

Connect your application

These values fill request examples and the API console. They stay in this browser tab and are never sent to TalkLabs until you run a request.

Credentials are stored in sessionStorage, not in cookies or analytics.