Skip to main content
GET
/
public
/
v1
/
search
curl -X GET "https://api.copera.app/public/v1/search?q=mike&limit=20" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "query": "<string>",
  "totalHits": 123,
  "processingTimeMs": 123,
  "hits": [
    {
      "entityType": "document",
      "_id": "<string>",
      "title": "<string>",
      "workspace": "<string>",
      "owner": "<string>",
      "createdAt": 123,
      "updatedAt": 123,
      "mdBody": "<string>"
    }
  ]
}

Query Parameters

  • q (required): Search query string
  • types (optional): Restrict search to specific entity types. Accepts repeated params or a CSV string. Valid values:
    • document — text documents (requires ACCESS_DOCS)
    • channel — chat channels (requires ACCESS_CHANNELS)
    • channelMessage — chat messages (requires ACCESS_CHANNELS)
    • voiceTranscription — voice meeting transcriptions (requires ACCESS_CHANNELS)
    • driveContent — drive files and folders (requires ACCESS_DRIVE)
    • todo — todo lists
    • todoItem — individual todos
    • aiChat — AI chat conversations
    • aiChatMessage — messages inside AI chats
  • sortBy (optional): createdAt or updatedAt (default: updatedAt)
  • sortOrder (optional): asc or desc (default: desc)
  • limit (optional): Max results, 1-100 (default: 50)

Response

Returns a flat list of hits. Each hit has an entityType discriminator and type-specific fields. All timestamps are epoch milliseconds. If the token lacks permission for a requested entity type, the type is silently dropped. If no types remain after filtering and types was explicitly provided, a 403 is returned. External users cannot access this endpoint.

Authorizations

Authorization
string
header
required

Bearer token

Query Parameters

q
string
required

Search query string

Minimum string length: 1
types

Restrict search to specific entity types. Accepts repeated query params or a CSV string.

Available options:
document
sortBy

Sort field. Defaults to updatedAt.

Available options:
createdAt
sortOrder

Sort order. Defaults to desc.

Available options:
asc
limit
number

Max results (1-100). Defaults to 50.

Required range: 1 <= x <= 100

Response

Default Response

query
string
required
totalHits
number
required
processingTimeMs
number
required
hits
object[]
required