Library
Search documents
Searches a matter's Discovery documents and returns ranked hits with snippets. Results are checked against the caller's access like every list, so a hit is never a document the caller can't open.
POST/api/v1/matters/{matter_id}/search
Authorization
AuthorizationstringheaderrequiredBearer authentication header of the form
Bearer <token>, where <token> is your Sentinel API key. See Authentication.Path parameters
matter_idstringpathrequired≤ 64 charactersThe matter's ID, from List matters.
Body
application/json
querystringrequired1–500 charactersWhat to search for. Keyword mode supports exact phrases, names and Bates numbers.
modestringdefault: "hybrid"keyword for exact terms, semantic for meaning, hybrid for both (best for most questions).One of
keyword semantic hybridlimitintegerdefault: 201–50Hits to return.
Response
200 · Ranked hits, best first.
dataSearchHit[]requiredFields
documentDocumentrequiredFields
idstringrequiredmatter_idstringrequiredfile_namestringrequireddocument_typestring | nullrequiredFor example
email, attachment or file.mime_typestring | nullrequiredfile_sizeinteger | nullrequiredBytes.
page_countinteger | nullrequiredcustodianstring | nullrequiredparent_document_idstring | nullrequiredFor an attachment, the email it belongs to.
bates_numberstring | nullrequiredemailobject | nullrequiredEmail envelope, when the document is an email.
document_datestring (date-time) | nullrequireduploaded_atstring (date-time) | nullrequiredsnippetstring | nullrequiredMatching passage, up to 1,000 characters. Keyword matches are wrapped in
<mark> tags.scorenumberrequiredRelevance within this search. Higher is better. Scores aren't comparable across modes.
modestringrequiredThe mode that ran.
One of
keyword semantic hybriddegradedbooleanrequiredtrue when a hybrid search fell back to keyword-only because the semantic side failed.Errors
| Status | Type | When |
|---|---|---|
400 | invalid_request | Invalid parameters. |
401 | authentication_required | Missing, invalid, revoked or expired API key. |
403 | permission_denied | The key's role can't use the API. |
404 | not_found | No such matter, or the caller can't access it. |
429 | rate_limited | More than 120 requests in a minute from one key. Retry after the Retry-After header's seconds. |
See Errors and Rate limits.