ClientSphereDocs
API reference/Knowledge Base

Search articles

Full-text search across knowledge base articles. The response nests differently from the other lists: data is an object holding articles and totalCount.

GET
/knowledge-base/articles/search

Authorization

AuthorizationRequiredBearer <token>

API key as Bearer token: Authorization: Bearer sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

X-API-Key<token>

API key via header: X-API-Key: sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

Query Parameters

queryRequiredstring

The search text. Required — omitting it returns 400.

categoryIdstring

Restrict the search to one category.

Format: "uuid"
limitinteger

Maximum articles to return. Defaults to 10 on this endpoint, not the usual 20.

Default: 10
curl -X GET "https://clientsphere.io/api/v1/knowledge-base/articles/search?query=%3Cstring%3E&categoryId=497f6eca-6276-4993-bfeb-53cbbbba6f08&limit=10" \
  -H "Authorization: Bearer <token>"

Search results

{
  "data": {
    "articles": [
      {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda",
        "categoryId": "337f5e5d-288b-40d5-be14-901cc3acacc0",
        "title": "string",
        "slug": "string",
        "content": "string",
        "excerpt": "string",
        "tags": "string",
        "status": "published",
        "visibility": "public",
        "authorId": 0,
        "lastEditedBy": 0,
        "viewCount": 0,
        "isHelpful": 0,
        "isNotHelpful": 0,
        "sortOrder": 0,
        "seoTitle": "string",
        "seoDescription": "string",
        "publishedAt": "2019-08-24T14:15:22Z",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      }
    ],
    "totalCount": 0
  }
}