Knowledge
Search knowledge base
Semantic (embedding cosine-similarity) search over the org's knowledge base chunks. Only chunks scoring above a 0.3 similarity threshold are returned.
GET
/api/public/knowledge/searchcURLGET /api/public/knowledge/search
curl "https://postiv.ai/api/public/knowledge/search?query=launch%20week&limit=10" \
-H "Authorization: Bearer pk_postiv_..."200Response
{
"success": true,
"hits": [
{
"assetId": "b1c2...",
"title": "Q3 Positioning Notes",
"kind": "document",
"content": "Postiv is an inbound LinkedIn content tool for agencies...",
"score": 0.81
}
]
}Authorization
Requires an organization API key with the knowledge:read scope, sent as Authorization: Bearer or x-api-key.
Query parameters
querystringrequiredSearch text, 1-2000 chars (trimmed).
limitintdefault: 5Max results, 1-20.
Response
Ranked list of matching chunks.
hits[].assetIduuidSource asset id.
hits[].titlestringSource asset title.
hits[].kindstringNormalized asset kind.
hits[].contentstringChunk text, truncated to 500 chars with a trailing ellipsis if longer.
hits[].scorefloatCosine similarity score (>0.3).
Errors
| 400 | validation_error: missing/empty query |
Good to know
- Scoped strictly by the API key's org_id (not the app's getUserOrganization 'most recent org' pattern), so it's correct for multi-org/agency callers.