Search docs ⌘K
esc
Type to search across all documentation pages
Search

Search

Managed hybrid retrieval primitives backed by D1 metadata, lexical FTS recall, optional Vectorize sync, and Workers AI embeddings or rerank. SaaSignal owns the retrieval surface, but your application still owns source-of-truth documents and business logic.

Boundary: Search indexes are retrieval infrastructure, not an application database. Keep catalog truth, ACLs, and final answer generation in your own SQL and service layer.

Create Search Index

POST
/infra/decisioning/search/indexes
search:writevariable by index metadata and future document sync

Create a managed search index backed by D1 metadata, FTS recall, and optional Vectorize namespaces.

curl
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/search/indexes \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name":"example","dimensions":1}'
json — 200 OK
{ "status": "ok" }
typescript
const index = await ss.infra.decisioning.search.createIndex({ name: 'products', dimensions: 1024, mode: 'hybrid', embedding_model: 'workers-ai:bge-m3' })
  1. Open Dashboard → API Console and select your project
  2. Choose POST /infra/decisioning/search/indexes from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Body field
Type
Description
name required
string
1–120 chars
description
string
max 500 chars
metric
string
values: cosine, dot-product, euclidean
dimensions required
integer
range ≥1 .. ≤4096
mode
string
values: lexical, semantic, hybrid
embedding_model
string
rerank_model
string
vector_namespace
string
max 255 chars
metadata_schema
mixed
Error responses
400 Bad request
401 Unauthorized
402 Insufficient tokens
403 Forbidden
409 Conflict
429 Rate limited

List Search Indexes

GET
/infra/decisioning/search/indexes
search:read

List search indexes for the active project.

curl
curl https://api.saasignal.saastemly.com/infra/decisioning/search/indexes \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
typescript
const { indexes } = await ss.infra.decisioning.search.listIndexes()
  1. Open Dashboard → API Console and select your project
  2. Choose GET /infra/decisioning/search/indexes from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Error responses
401 Unauthorized
403 Forbidden
429 Rate limited

Get Search Index

GET
/infra/decisioning/search/indexes/{index_id}
search:read

Get a search index definition and rebuild metadata.

curl
curl https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id} \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
typescript
const index = await ss.infra.decisioning.search.getIndex('sidx_123')
  1. Open Dashboard → API Console and select your project
  2. Choose GET /infra/decisioning/search/indexes/{index_id} from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Path param
Type
Description
index_id required
string
Error responses
401 Unauthorized
403 Forbidden
404 Not found
429 Rate limited

Update Search Index

PATCH
/infra/decisioning/search/indexes/{index_id}
search:writevariable by index metadata

Update mutable search index metadata.

curl
curl -X PATCH https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id} \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{}'
json — 200 OK
{ "status": "ok" }
typescript
const index = await ss.infra.decisioning.search.updateIndex('sidx_123', { description: 'Hybrid product retrieval' })
  1. Open Dashboard → API Console and select your project
  2. Choose PATCH /infra/decisioning/search/indexes/{index_id} from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Path param
Type
Description
index_id required
string
Body field
Type
Description
name
string
1–120 chars
description
mixed
mode
string
values: lexical, semantic, hybrid
embedding_model
mixed
rerank_model
mixed
vector_namespace
mixed
metadata_schema
mixed
Error responses
400 Bad request
401 Unauthorized
402 Insufficient tokens
403 Forbidden
404 Not found
429 Rate limited

Delete Search Index

DELETE
/infra/decisioning/search/indexes/{index_id}
search:writevariable by index state

Delete a search index and all synced documents.

curl
curl -X DELETE https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id} \
  -H "Authorization: Bearer sk_live_..."
typescript
await ss.infra.decisioning.search.deleteIndex('sidx_123')
  1. Open Dashboard → API Console and select your project
  2. Choose DELETE /infra/decisioning/search/indexes/{index_id} from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Path param
Type
Description
index_id required
string
Error responses
401 Unauthorized
402 Insufficient tokens
403 Forbidden
404 Not found
429 Rate limited

Upsert Search Documents

POST
/infra/decisioning/search/indexes/{index_id}/documents/upsert
search:write

Upsert documents with caller-supplied vectors or optional auto-embedding. SaaSignal stores document state in D1 and syncs vector-capable indexes into Vectorize when possible.

curl
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/documents/upsert \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"documents":[]}'
json — 200 OK
{ "status": "ok" }
typescript
await ss.infra.decisioning.search.upsertDocuments('sidx_123', { auto_embed: true, documents: [{ id: 'sku_123', text: 'Waterproof trail jacket', metadata: { brand: 'Northline', in_stock: true } }] })
  1. Open Dashboard → Decisioning and select your project
  2. Go to the Search workspace
  3. Select the index, paste the document-upsert payload into the seed card, and run it to refresh lexical and semantic retrieval state.
Path param
Type
Description
index_id required
string
Body field
Type
Description
auto_embed
boolean
default true
documents required
array
1–100 items
Error responses
400 Bad request
401 Unauthorized
402 Insufficient tokens
403 Forbidden
404 Not found
429 Rate limited

List Search Documents

GET
/infra/decisioning/search/indexes/{index_id}/documents
search:read

List caller-owned documents stored in a managed search index.

curl
curl https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/documents \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
typescript
const { documents } = await ss.infra.decisioning.search.listDocuments('sidx_123')
  1. Open Dashboard → API Console and select your project
  2. Choose GET /infra/decisioning/search/indexes/{index_id}/documents from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Path param
Type
Description
index_id required
string
Error responses
401 Unauthorized
403 Forbidden
404 Not found
429 Rate limited

Get Search Document

GET
/infra/decisioning/search/indexes/{index_id}/documents/{document_id}
search:read

Get one caller-owned document stored in a managed search index.

curl
curl https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/documents/{document_id} \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
typescript
const document = await ss.infra.decisioning.search.getDocument('sidx_123', 'sku_123')
  1. Open Dashboard → API Console and select your project
  2. Choose GET /infra/decisioning/search/indexes/{index_id}/documents/{document_id} from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Path param
Type
Description
index_id required
string
document_id required
string
Error responses
401 Unauthorized
403 Forbidden
404 Not found
429 Rate limited

Delete Search Document

DELETE
/infra/decisioning/search/indexes/{index_id}/documents/{document_id}
search:writevariable by sync work

Delete one document from a search index.

curl
curl -X DELETE https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/documents/{document_id} \
  -H "Authorization: Bearer sk_live_..."
typescript
await ss.infra.decisioning.search.deleteDocument('sidx_123', 'sku_123')
  1. Open Dashboard → API Console and select your project
  2. Choose DELETE /infra/decisioning/search/indexes/{index_id}/documents/{document_id} from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Path param
Type
Description
index_id required
string
document_id required
string
Error responses
401 Unauthorized
402 Insufficient tokens
403 Forbidden
404 Not found
429 Rate limited

Query Search Index

POST
/infra/decisioning/search/indexes/{index_id}/query
search:readvariable by retrieval mode, candidate set size, and reranking

Query a managed search index with lexical, semantic, or hybrid retrieval, with optional AI reranking of the top candidate set.

curl
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/query \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{}'
json — 200 OK
{ "status": "ok" }
typescript
const result = await ss.infra.decisioning.search.query('sidx_123', { query_text: 'waterproof running jacket', mode: 'hybrid', rerank: true, limit: 8 })
  1. Open Dashboard → Decisioning and select your project
  2. Go to the Search workspace
  3. Run the query card against the selected index to debug candidate recall, hybrid weighting, and ranked document output.
Path param
Type
Description
index_id required
string
Body field
Type
Description
query_text
string
max 50000 chars
query_vector
array
max 4096 items
limit
integer
range ≥1 .. ≤100default 10
filter
object
mode
string
values: lexical, semantic, hybrid
alpha
number
range ≥0 .. ≤1
rerank
boolean
default false
Error responses
400 Bad request
401 Unauthorized
402 Insufficient tokens
403 Forbidden
404 Not found
429 Rate limited

Suggest Search Terms

POST
/infra/decisioning/search/indexes/{index_id}/suggest
search:readvariable by candidate set

Return prefix suggestions derived from indexed document text.

curl
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/suggest \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"prefix":"..."}'
json — 200 OK
{ "status": "ok" }
typescript
const { suggestions } = await ss.infra.decisioning.search.suggest('sidx_123', { prefix: 'water', limit: 5 })
  1. Open Dashboard → API Console and select your project
  2. Choose POST /infra/decisioning/search/indexes/{index_id}/suggest from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Path param
Type
Description
index_id required
string
Body field
Type
Description
prefix required
string
1–120 chars
limit
integer
range ≥1 .. ≤20default 5
Error responses
400 Bad request
401 Unauthorized
402 Insufficient tokens
403 Forbidden
404 Not found
429 Rate limited

Get Search Stats

GET
/infra/decisioning/search/indexes/{index_id}/stats
search:read

Get item counts plus rebuild and vector sync state for a search index.

curl
curl https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/stats \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
typescript
const stats = await ss.infra.decisioning.search.stats('sidx_123')
  1. Open Dashboard → API Console and select your project
  2. Choose GET /infra/decisioning/search/indexes/{index_id}/stats from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Path param
Type
Description
index_id required
string
Error responses
401 Unauthorized
403 Forbidden
404 Not found
429 Rate limited

Rebuild Search Index

POST
/infra/decisioning/search/indexes/{index_id}/rebuild
search:write

Re-sync lexical and semantic state for all documents in the index. Async mode updates rebuild status in the background.

curl
curl -X POST https://api.saasignal.saastemly.com/infra/decisioning/search/indexes/{index_id}/rebuild \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{}'
json — 200 OK
{ "status": "ok" }
typescript
await ss.infra.decisioning.search.rebuild('sidx_123', { async: true })
  1. Open Dashboard → API Console and select your project
  2. Choose POST /infra/decisioning/search/indexes/{index_id}/rebuild from the route list
  3. Fill in the JSON body or Storage references, then send the request and inspect the response directly in the console
Path param
Type
Description
index_id required
string
Body field
Type
Description
async
boolean
default false
Error responses
400 Bad request
401 Unauthorized
402 Insufficient tokens
403 Forbidden
404 Not found
429 Rate limited