Skip to main content
Search what the agreement text says about a subject

Authorizations

Authorization
string
header
required

Personal API key sent as a bearer token, together with X-Organization-Id. The key must have at least the access level the endpoint requires (read, write or admin).

Headers

X-Organization-Id
string

The organization to act in. Required for personal API keys; list the organizations you can access with GET /v1/organizations.

Body

application/json
query
string
required

What to look for. ranked: a question or keywords, up to 4,000 characters. exact: the literal text, up to 256 characters; case and whitespace are ignored, punctuation is not.

Required string length: 1 - 4000
mode
enum<string>
default:ranked

ranked (default): the most relevant passages of accepted agreement terms, by meaning and keywords. exact: every occurrence of a literal string in the given document_ids.

Available options:
ranked,
exact
document_ids
string<uuid>[]

ranked: search only these documents (at most 500); any that are not accepted agreement terms come back in unavailable_documents. exact: required, 1–10 documents of any kind in this organization.

Required array length: 1 - 500 elements
agreement_ids
string<uuid>[]

ranked only: search the accepted terms of these agreements (at most 100). With document_ids too, a document must match both.

Required array length: 1 - 100 elements
limit
integer

ranked: passages to return, 5 by default. exact: occurrences to collect per document, 20 by default; occurrences close together share one passage.

Required range: 1 <= x <= 50

Response

Relevant passages and the documents that could not be searched.

mode
enum<string>
required
Available options:
ranked
passages
object[]
required
unavailable_documents
object[]
required