Search Notes by Keyword
Changed onSearch notes by keyword. The scope of the search is controlled by the request body:
- Provide noteIds to limit the search to specific notes.
- Provide companyId to limit the search to notes associated with a specific company.
- Omit both to search across your entire account.
noteIds and companyId are mutually exclusive.
Returns up to limit notes ordered by relevance. Prompts with no strong matches may still return low-relevance results.
Each result contains a matched note and a single representative excerpt (a matching passage from that note). Even if a note contains multiple matching passages, it appears exactly once in the response with one excerpt.
Request
- Base URLhttps://api.affinity.co
- URLhttps://api.affinity.co/v2/notes/search
- Auth
- HTTP bearer
- or OAuth 2Authorization code: https://login.affinity.co/auth/oauth2/authorizeToken URL: https://login.affinity.co/auth/oauth2/token scopes: api.read
Request body
Example request
{
"prompt": "Series B terms",
"noteIds": [
1,
2
],
"limit": 20
}Response
Created
Example response
{
"data": [
{
"note": {
"id": 1,
"kind": "note"
},
"preview": "We discussed the Series B terms with the founding team last Thursday."
}
]
}Changes
- info
the endpoint scheme security
apiKeyAuthwas added to the API - info
the endpoint scheme security
oauth2was added to the API - info
added
authenticationauthorizationbad-requestconflictmethod-not-allowednot-acceptablenot-foundnot-implementedrate-limitservertimeoutunprocessable-entityunsupported-media-typevalidationdiscriminator mapping keys to the/response property for the response status - info
added
bad-requestvalidationdiscriminator mapping keys to the/response property for the response status
- info