Dynamiq
Knowledge Bases

Search knowledge base documents (management API)

Performs a semantic search over a knowledge base's documents using the knowledge base's configured embedder and retriever. This is the management-API equivalent of the hostname POST /v1/documents/search, addressed by knowledge base ID and authenticated with a personal access token.

POST
/v1/knowledgebases/{knowledgebase_id}/vector-search

Authorization

personalAccessToken
AuthorizationBearer <token>

Personal Access Token of a Dynamiq user — the only credential accepted by the management API (api.*). Prefix dyn_pat_ (legacy uak_ tokens still authenticate). Send as Authorization: Bearer <token>.

In: header

Path Parameters

knowledgebase_id*string

Knowledge base UUID.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Body for POST /v1/knowledgebases/{knowledgebase_id}/vector-search.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/knowledgebases/497f6eca-6276-4993-bfeb-53cbbbba6f08/vector-search" \  -H "Content-Type: application/json" \  -d '{    "query": "refund policy for duplicate charges",    "limit": 5  }'
{
  "data": [
    {
      "id": "string",
      "content": "string",
      "metadata": {},
      "embedding": [
        0
      ],
      "score": 0
    }
  ]
}
{
  "error": {
    "code": "bad_request",
    "message": "Bad Request",
    "details": {
      "input": "cannot be blank"
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Unauthorized"
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Not Found"
  }
}