Skip to content

Search tickets

POST
/search
curl --request POST \
--url https://api.muninx.com/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "q": "expired login link", "per-page": 20, "page": 1, "group-limit": 3, "include-preview": false, "filters": { "kind": [ "title" ], "author-id": "example", "created-at-from": 1, "created-at-to": 1 } }'

Searches ticket content and returns grouped ticket IDs. Results are scoped by JWT tenant, user, and role claims.

Media type application/json
object
q
required
string
Example
expired login link
per-page

Results per page. Values above 100 are clamped to 100; missing or non-positive values default to 20.

integer
default: 20 >= 1 <= 100
Example
20
page

One-based page number. Missing or non-positive values default to 1.

integer
default: 1 >= 1
Example
1
group-limit

Maximum matching documents considered per ticket group. Values above 25 are clamped to 25; missing or non-positive values default to 3.

integer
default: 3 >= 1 <= 25
Example
3
include-preview

Return a short snippet from the matched content instead of the full body.

boolean
filters
object
kind

Restrict search to specific ticket document kinds. Customer users never receive internal messages.

Array<string>
Allowed values: title description message internal_message
author-id
string
created-at-from

Inclusive lower bound for the document creation Unix timestamp.

integer format: int64
created-at-to

Inclusive upper bound for the document creation Unix timestamp.

integer format: int64

Grouped ticket search results

Media type application/json
object
ticket-ids

Ticket IDs grouped from matching Typesense documents.

Array<string>
found
integer format: int32
page
integer
per-page
integer
group-limit
integer
filter-by

Typesense filter expression applied after RBAC and request filters.

string
next-page

Next page number when more results are available; omitted on the last page.

integer
nullable
previews

Optional snippets keyed by ticket id when include-preview is true. Includes the document kind that matched (message, title, etc.).

object
key
additional properties
object
snippet
string
kind
string
Allowed values: title description message internal_message
Example
{
"found": 42,
"previews": {
"additionalProperty": {
"kind": "title"
}
}
}

Invalid request body, invalid filters, missing claims, or invalid query.

Media type application/problem+json

RFC 9457 problem details response emitted by the shared error middleware.

object
type
string
title
string
status
integer
detail
string
instance
string
code
string
requestId
string
Example
{
"title": "Bad Request",
"status": 400,
"detail": "search query cannot be empty",
"instance": "/search",
"code": "missing_query"
}

Missing, invalid, or unauthorized bearer token.

Media type application/problem+json

RFC 9457 problem details response emitted by the shared error middleware.

object
type
string
title
string
status
integer
detail
string
instance
string
code
string
requestId
string
Example
{
"title": "Bad Request",
"status": 400,
"detail": "search query cannot be empty",
"instance": "/search",
"code": "missing_query"
}

Search backend or unexpected server failure.

Media type application/problem+json

RFC 9457 problem details response emitted by the shared error middleware.

object
type
string
title
string
status
integer
detail
string
instance
string
code
string
requestId
string
Example
{
"title": "Bad Request",
"status": 400,
"detail": "search query cannot be empty",
"instance": "/search",
"code": "missing_query"
}