Search a Space
Find documentation using semantic search within one Space.
{
"title": "Search a Space",
"description": "",
"method": "POST",
"baseUrl": "https://app.docuwriter.ai",
"endpoint": "/api/spaces/{space}/search",
"headers": [
{
"key": "Authorization",
"value": "Bearer YOUR_API_TOKEN",
"type": "string",
"required": true
},
{
"key": "Accept",
"value": "application/json",
"type": "string",
"required": true
},
{
"key": "Content-Type",
"value": "application/json",
"type": "string",
"required": true
}
],
"queryParams": [],
"pathParams": [
{
"key": "space",
"value": "Numeric Space ID.",
"type": "integer",
"required": true
}
],
"bodyType": "json",
"requestBody": "{\n \"query\": \"How are failed payments retried?\",\n \"per_page\": 10,\n \"highlight\": false\n}",
"formData": [],
"rawBody": "",
"responses": {
"200": {
"description": "HTTP 200: success: true, data.results, total, query, and space (id, name, is_public). Each result includes id, item_type, title, url, snippet, score, updated_at. Highlighted snippets may contain <mark> tags. total is the number returned, not an estimated corpus-wide count. Illustrative JSON example; sample values are fictional. Some optional or additional resource fields may be omitted.",
"body": "{\n \"success\": true,\n \"data\": {\n \"results\": [],\n \"total\": 0,\n \"query\": \"payment lifecycle\",\n \"space\": {\n \"id\": 123,\n \"name\": \"Payments\",\n \"is_public\": false\n }\n }\n}"
},
"401": {
"description": "Missing or invalid account API token.Missing or invalid account API token. Example JSON response.",
"body": "{\n \"message\": \"Unauthenticated.\"\n}"
}
}
}
Request fields
| Field | Requirement |
|---|---|
query |
Required query: string with at least 2 characters. |
per_page |
Optional per_page: integer 1–100, default 20 |
| Behavior | it limits returned hits and is not page-number pagination. |
highlight |
Optional highlight: boolean, default true. |
Usage notes
- The request is authenticated.
- A public Space can be searched; a private Space requires management permission.
- 403 if access fails, 422 for bad input, 500 if search fails.
- Recently created or edited pages may not yet be indexed.
- Read the actual page before treating a search snippet as complete evidence.
Updated