Opengram

Search chats and messages

GET
/api/v1/search

Authorization

bearerAuth
AuthorizationBearer <token>

Instance secret token

In: header

Query Parameters

q*string
Length1 <= length
scope?string

Search scope (default: titles)

Value in"all" | "titles" | "messages"
cursor?string
limit?integer
Range1 <= value <= 100

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/v1/search?q=string"
{
  "chats": [
    {
      "id": "string",
      "title": "string",
      "snippet": "string",
      "agent_ids": [
        "string"
      ]
    }
  ],
  "messages": [
    {
      "id": "string",
      "chat_id": "string",
      "chat_title": "string",
      "snippet": "string",
      "agent_ids": [
        "string"
      ]
    }
  ],
  "cursor": {
    "next": "string",
    "hasMore": true
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request.",
    "details": null
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request.",
    "details": null
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request.",
    "details": null
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request.",
    "details": null
  }
}