Developers Get an API key
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

Authorizationstringheaderrequired
Bearer authentication header of the form Bearer <token>, where <token> is your Sentinel API key. See Authentication.

Path parameters

matter_idstringpathrequired≤ 64 characters
The matter's ID, from List matters.

Body

application/json

querystringrequired1–500 characters
What 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 hybrid
limitintegerdefault: 201–50
Hits to return.

Response

200 · Ranked hits, best first.

dataSearchHit[]required
Fields
documentDocumentrequired
Fields
idstringrequired
matter_idstringrequired
file_namestringrequired
document_typestring | nullrequired
For example email, attachment or file.
mime_typestring | nullrequired
file_sizeinteger | nullrequired
Bytes.
page_countinteger | nullrequired
custodianstring | nullrequired
parent_document_idstring | nullrequired
For an attachment, the email it belongs to.
bates_numberstring | nullrequired
emailobject | nullrequired
Email envelope, when the document is an email.
document_datestring (date-time) | nullrequired
uploaded_atstring (date-time) | nullrequired
snippetstring | nullrequired
Matching passage, up to 1,000 characters. Keyword matches are wrapped in <mark> tags.
scorenumberrequired
Relevance within this search. Higher is better. Scores aren't comparable across modes.
modestringrequired
The mode that ran.
One of keyword semantic hybrid
degradedbooleanrequired
true when a hybrid search fell back to keyword-only because the semantic side failed.

Errors

StatusTypeWhen
400invalid_requestInvalid parameters.
401authentication_requiredMissing, invalid, revoked or expired API key.
403permission_deniedThe key's role can't use the API.
404not_foundNo such matter, or the caller can't access it.
429rate_limitedMore than 120 requests in a minute from one key. Retry after the Retry-After header's seconds.

See Errors and Rate limits.