Skip to content

Rest API

Search the content library

GET
/api/v1/wiki/search
curl --request GET \
--url 'https://api.unless.com/api/v1/wiki/search?query=example' \
--header 'x-account-id: example' \
--header 'x-api-key: example' \
--header 'x-user-email: example' \
--header 'x-website-id: example'

Find content library pages about a topic with a natural language query, ranked by semantic similarity. Use it to check whether information is already covered before adding new content, then read a page by its path.

Notes

  • Scoped to the workspace in x-website-id
  • Returns up to 10 pages
x-api-key
required
string

Your API key from account settings.

x-user-email
required
string

The email address of your user.

x-account-id
required
string

The ID of your account. You can find this in the account settings.

x-website-id
required
string

The ID of the workspace you want to use.

query
required
string

A natural language description of the content you are looking for, e.g. how do I get a refund.

The best matching pages, most relevant first.

Media typeapplication/json
object
results
Array<object>
object
path

The page path, to read the page with the read endpoint.

string
excerpt

The first 200 characters of the page.

string

Example

{
"results": [
{
"path": "/billing/refunds.md",
"excerpt": "How to request a refund for an invoice you paid by mistake."
}
]
}

Bad request - missing query.

Unauthorized - invalid API key.

Not found - the website does not belong to the account.

Bad request - missing websiteId.