Skip to content

Commit 7685c4c

Browse files
authored
Add GET /content/search schema to Preview spec (#513)
* Add GET /content/search schema to Preview spec Mirrors developer-docs PR #926. Adds: - GET /content/search path (Knowledge Hub keyword search) - content_search_response / _result / _default_item / _article_item / _article_content_item schemas - Knowledge Hub tag * Rename Knowledge Hub tag to Knowledge + reframe descriptions Per review feedback: - Tag: Knowledge Hub -> Knowledge - Tag description: 'Search the knowledge base contents like articles, snippets, etc.' - Operation summary + description reframed to 'knowledge base contents'
1 parent a16276b commit 7685c4c

1 file changed

Lines changed: 243 additions & 0 deletions

File tree

descriptions/0/api.intercom.io.yaml

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6802,6 +6802,98 @@ paths:
68026802
message: Access Token Invalid
68036803
schema:
68046804
"$ref": "#/components/schemas/error"
6805+
"/content/search":
6806+
get:
6807+
summary: Search knowledge base contents
6808+
parameters:
6809+
- name: Intercom-Version
6810+
in: header
6811+
schema:
6812+
"$ref": "#/components/schemas/intercom_version_preview"
6813+
- name: query
6814+
in: query
6815+
required: true
6816+
description: The keyword(s) to search for across the knowledge base contents.
6817+
example: billing
6818+
schema:
6819+
type: string
6820+
- name: page
6821+
in: query
6822+
required: false
6823+
description: The page number to fetch. Defaults to 1. Values below 1 are
6824+
clamped to 1.
6825+
example: 1
6826+
schema:
6827+
type: integer
6828+
default: 1
6829+
minimum: 1
6830+
- name: per_page
6831+
in: query
6832+
required: false
6833+
description: Number of results per page. Defaults to 10. Maximum 50.
6834+
example: 10
6835+
schema:
6836+
type: integer
6837+
default: 10
6838+
minimum: 1
6839+
maximum: 50
6840+
tags:
6841+
- Knowledge
6842+
operationId: searchContent
6843+
description: |
6844+
Search the knowledge base contents — articles, snippets, external pages, uploaded files, and internal articles — using a keyword query.
6845+
6846+
Each result row has a `type` discriminator. Most types (`content_snippet`, `external_content`, `file_source_content`, `internal_article`) return a flat `{ type, id, title }` shape. Help center articles return a nested shape with a `contents[]` array, one entry per locale.
6847+
6848+
Requires the `read_content` OAuth scope.
6849+
responses:
6850+
'200':
6851+
description: Search successful
6852+
content:
6853+
application/json:
6854+
examples:
6855+
Search successful:
6856+
value:
6857+
type: list
6858+
total_count: 5
6859+
pages:
6860+
type: pages
6861+
page: 1
6862+
per_page: 10
6863+
total_pages: 1
6864+
next:
6865+
prev:
6866+
data:
6867+
- type: content_snippet
6868+
id: '123'
6869+
title: Billing FAQ
6870+
- type: external_content
6871+
id: '456'
6872+
title: How to reset your password
6873+
- type: file_source_content
6874+
id: '789'
6875+
title: billing-guide.pdf
6876+
- type: internal_article
6877+
id: '012'
6878+
title: 'Internal SOP: Refunds'
6879+
- type: article
6880+
id: '345'
6881+
title: Billing FAQ
6882+
contents:
6883+
- type: article_content
6884+
id: '678'
6885+
title: Billing FAQ
6886+
locale: en
6887+
- type: article_content
6888+
id: '910'
6889+
title: Facturation FAQ
6890+
locale: fr
6891+
schema:
6892+
"$ref": "#/components/schemas/content_search_response"
6893+
'401':
6894+
$ref: "#/components/responses/Unauthorized"
6895+
'422':
6896+
$ref: "#/components/responses/ValidationError"
68056897
"/content_snippets":
68066898
get:
68076899
summary: List all content snippets
@@ -22235,6 +22327,155 @@ components:
2223522327
description: The content sources used by AI Agent in the conversation.
2223622328
items:
2223722329
"$ref": "#/components/schemas/content_source"
22330+
content_search_article_content_item:
22331+
title: Content Search Article Content Item
22332+
type: object
22333+
description: A single locale variant of a help center article returned from
22334+
Knowledge Hub search.
22335+
properties:
22336+
type:
22337+
type: string
22338+
description: Always `article_content`.
22339+
enum:
22340+
- article_content
22341+
example: article_content
22342+
id:
22343+
type: string
22344+
description: The unique identifier of the article content.
22345+
example: '678'
22346+
title:
22347+
type: string
22348+
description: The localized title of the article.
22349+
example: Billing FAQ
22350+
locale:
22351+
type: string
22352+
description: The locale of this article content.
22353+
example: en
22354+
content_search_article_item:
22355+
title: Content Search Article Item
22356+
type: object
22357+
description: A help center article result from Knowledge Hub search, with
22358+
one nested `article_content` entry per locale.
22359+
required:
22360+
- type
22361+
properties:
22362+
type:
22363+
type: string
22364+
description: Always `article`.
22365+
enum:
22366+
- article
22367+
example: article
22368+
id:
22369+
type: string
22370+
description: The unique identifier of the article.
22371+
example: '345'
22372+
title:
22373+
type: string
22374+
description: The article's canonical title.
22375+
example: Billing FAQ
22376+
contents:
22377+
type: array
22378+
description: One entry per locale of the article.
22379+
items:
22380+
"$ref": "#/components/schemas/content_search_article_content_item"
22381+
content_search_default_item:
22382+
title: Content Search Default Item
22383+
type: object
22384+
description: The flat result shape returned from Knowledge Hub search for
22385+
content snippets, external pages, uploaded files, and internal articles.
22386+
required:
22387+
- type
22388+
properties:
22389+
type:
22390+
type: string
22391+
description: The kind of content item.
22392+
enum:
22393+
- content_snippet
22394+
- external_content
22395+
- file_source_content
22396+
- internal_article
22397+
example: content_snippet
22398+
id:
22399+
type: string
22400+
description: The unique identifier of the content item.
22401+
example: '123'
22402+
title:
22403+
type: string
22404+
description: The display title of the content item.
22405+
example: Billing FAQ
22406+
content_search_response:
22407+
title: Content Search Response
22408+
type: object
22409+
description: A paginated list of Knowledge Hub content results matching a
22410+
search query.
22411+
properties:
22412+
type:
22413+
type: string
22414+
description: Always `list`.
22415+
enum:
22416+
- list
22417+
example: list
22418+
total_count:
22419+
type: integer
22420+
description: Total number of results matching the query.
22421+
example: 5
22422+
pages:
22423+
type: object
22424+
description: Pagination metadata, including links to neighbouring pages.
22425+
properties:
22426+
type:
22427+
type: string
22428+
enum:
22429+
- pages
22430+
example: pages
22431+
page:
22432+
type: integer
22433+
description: The current page number.
22434+
example: 1
22435+
per_page:
22436+
type: integer
22437+
description: Number of results per page.
22438+
example: 10
22439+
total_pages:
22440+
type: integer
22441+
description: Total number of pages of results.
22442+
example: 1
22443+
next:
22444+
type: string
22445+
format: uri
22446+
description: A link to the next page of results, or null when on
22447+
the last page.
22448+
nullable: true
22449+
example: https://api.intercom.io/content/search?query=billing&page=2
22450+
prev:
22451+
type: string
22452+
format: uri
22453+
description: A link to the previous page of results, or null when
22454+
on the first page.
22455+
nullable: true
22456+
example:
22457+
data:
22458+
type: array
22459+
description: The list of matched content items. Each item's `type`
22460+
field determines its shape.
22461+
items:
22462+
"$ref": "#/components/schemas/content_search_result"
22463+
content_search_result:
22464+
title: Content Search Result
22465+
description: A single search result. The `type` field discriminates between
22466+
the flat shape used for snippets, external pages, files, and internal
22467+
articles, and the nested shape used for help center articles.
22468+
oneOf:
22469+
- "$ref": "#/components/schemas/content_search_default_item"
22470+
- "$ref": "#/components/schemas/content_search_article_item"
22471+
discriminator:
22472+
propertyName: type
22473+
mapping:
22474+
content_snippet: "#/components/schemas/content_search_default_item"
22475+
external_content: "#/components/schemas/content_search_default_item"
22476+
file_source_content: "#/components/schemas/content_search_default_item"
22477+
internal_article: "#/components/schemas/content_search_default_item"
22478+
article: "#/components/schemas/content_search_article_item"
2223822479
content_snippet:
2223922480
title: Content Snippet
2224022481
type: object
@@ -30911,6 +31152,8 @@ tags:
3091131152
description: Everything about your Internal Articles
3091231153
- name: Jobs
3091331154
description: Everything about jobs
31155+
- name: Knowledge
31156+
description: Search the knowledge base contents like articles, snippets, etc.
3091431157
- name: Macros
3091531158
description: Operations related to saved replies (macros) in conversations
3091631159
x-displayName: Macros

0 commit comments

Comments
 (0)