Skip to content

Commit 8b3ca83

Browse files
Restore /content/search schemas to Preview spec (#546)
Re-adds the GET /content/search path and the five content_search_* component schemas that were silently removed by sync PR #518. Matches runtime behavior of Api::V3::Content::SearchController: - query is optional (returns most recent when omitted), maxLength 500 - per_page defaults 10, max 50 - page defaults 1, minimum 1 Supersedes the inlined-schema design of developer-docs PR #942 with the named-schema design from OpenAPI PR #513, so the path block can be cleanly extended by the planned Tier-1 filter wave.
1 parent 7be2e63 commit 8b3ca83

1 file changed

Lines changed: 246 additions & 0 deletions

File tree

descriptions/0/api.intercom.io.yaml

Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8553,6 +8553,100 @@ paths:
85538553
- 100
85548554
remove_segment_ids:
85558555
- 200
8556+
"/content/search":
8557+
get:
8558+
summary: Search knowledge base contents
8559+
parameters:
8560+
- name: Intercom-Version
8561+
in: header
8562+
schema:
8563+
"$ref": "#/components/schemas/intercom_version_preview"
8564+
- name: query
8565+
in: query
8566+
required: false
8567+
description: A free-text search term matched against the title and body of
8568+
each content item. When omitted, returns the most recent content items.
8569+
example: billing
8570+
schema:
8571+
type: string
8572+
maxLength: 500
8573+
- name: page
8574+
in: query
8575+
required: false
8576+
description: The page number to fetch. Defaults to 1. Values below 1 are
8577+
clamped to 1.
8578+
example: 1
8579+
schema:
8580+
type: integer
8581+
default: 1
8582+
minimum: 1
8583+
- name: per_page
8584+
in: query
8585+
required: false
8586+
description: Number of results per page. Defaults to 10. Maximum 50.
8587+
example: 10
8588+
schema:
8589+
type: integer
8590+
default: 10
8591+
minimum: 1
8592+
maximum: 50
8593+
tags:
8594+
- Content
8595+
operationId: searchContent
8596+
description: |
8597+
Search the knowledge base contents — articles, snippets, external pages, uploaded files, and internal articles — using a keyword query.
8598+
8599+
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.
8600+
8601+
Requires the `read_content` OAuth scope.
8602+
responses:
8603+
'200':
8604+
description: Search successful
8605+
content:
8606+
application/json:
8607+
examples:
8608+
Search successful:
8609+
value:
8610+
type: list
8611+
total_count: 5
8612+
pages:
8613+
type: pages
8614+
page: 1
8615+
per_page: 10
8616+
total_pages: 1
8617+
next:
8618+
prev:
8619+
data:
8620+
- type: content_snippet
8621+
id: '123'
8622+
title: Billing FAQ
8623+
- type: external_content
8624+
id: '456'
8625+
title: How to reset your password
8626+
- type: file_source_content
8627+
id: '789'
8628+
title: billing-guide.pdf
8629+
- type: internal_article
8630+
id: '012'
8631+
title: 'Internal SOP: Refunds'
8632+
- type: article
8633+
id: '345'
8634+
title: Billing FAQ
8635+
contents:
8636+
- type: article_content
8637+
id: '678'
8638+
title: Billing FAQ
8639+
locale: en
8640+
- type: article_content
8641+
id: '910'
8642+
title: Facturation FAQ
8643+
locale: fr
8644+
schema:
8645+
"$ref": "#/components/schemas/content_search_response"
8646+
'401':
8647+
$ref: "#/components/responses/Unauthorized"
8648+
'422':
8649+
$ref: "#/components/responses/ValidationError"
85568650
"/content_snippets":
85578651
get:
85588652
summary: List all content snippets
@@ -26368,6 +26462,155 @@ components:
2636826462
description: The content sources used by AI Agent in the conversation.
2636926463
items:
2637026464
"$ref": "#/components/schemas/content_source"
26465+
content_search_article_content_item:
26466+
title: Content Search Article Content Item
26467+
type: object
26468+
description: A single locale variant of a help center article returned from
26469+
Knowledge Hub search.
26470+
properties:
26471+
type:
26472+
type: string
26473+
description: Always `article_content`.
26474+
enum:
26475+
- article_content
26476+
example: article_content
26477+
id:
26478+
type: string
26479+
description: The unique identifier of the article content.
26480+
example: '678'
26481+
title:
26482+
type: string
26483+
description: The localized title of the article.
26484+
example: Billing FAQ
26485+
locale:
26486+
type: string
26487+
description: The locale of this article content.
26488+
example: en
26489+
content_search_article_item:
26490+
title: Content Search Article Item
26491+
type: object
26492+
description: A help center article result from Knowledge Hub search, with
26493+
one nested `article_content` entry per locale.
26494+
required:
26495+
- type
26496+
properties:
26497+
type:
26498+
type: string
26499+
description: Always `article`.
26500+
enum:
26501+
- article
26502+
example: article
26503+
id:
26504+
type: string
26505+
description: The unique identifier of the article.
26506+
example: '345'
26507+
title:
26508+
type: string
26509+
description: The article's canonical title.
26510+
example: Billing FAQ
26511+
contents:
26512+
type: array
26513+
description: One entry per locale of the article.
26514+
items:
26515+
"$ref": "#/components/schemas/content_search_article_content_item"
26516+
content_search_default_item:
26517+
title: Content Search Default Item
26518+
type: object
26519+
description: The flat result shape returned from Knowledge Hub search for
26520+
content snippets, external pages, uploaded files, and internal articles.
26521+
required:
26522+
- type
26523+
properties:
26524+
type:
26525+
type: string
26526+
description: The kind of content item.
26527+
enum:
26528+
- content_snippet
26529+
- external_content
26530+
- file_source_content
26531+
- internal_article
26532+
example: content_snippet
26533+
id:
26534+
type: string
26535+
description: The unique identifier of the content item.
26536+
example: '123'
26537+
title:
26538+
type: string
26539+
description: The display title of the content item.
26540+
example: Billing FAQ
26541+
content_search_response:
26542+
title: Content Search Response
26543+
type: object
26544+
description: A paginated list of Knowledge Hub content results matching a
26545+
search query.
26546+
properties:
26547+
type:
26548+
type: string
26549+
description: Always `list`.
26550+
enum:
26551+
- list
26552+
example: list
26553+
total_count:
26554+
type: integer
26555+
description: Total number of results matching the query.
26556+
example: 5
26557+
pages:
26558+
type: object
26559+
description: Pagination metadata, including links to neighbouring pages.
26560+
properties:
26561+
type:
26562+
type: string
26563+
enum:
26564+
- pages
26565+
example: pages
26566+
page:
26567+
type: integer
26568+
description: The current page number.
26569+
example: 1
26570+
per_page:
26571+
type: integer
26572+
description: Number of results per page.
26573+
example: 10
26574+
total_pages:
26575+
type: integer
26576+
description: Total number of pages of results.
26577+
example: 1
26578+
next:
26579+
type: string
26580+
format: uri
26581+
description: A link to the next page of results, or null when on
26582+
the last page.
26583+
nullable: true
26584+
example: https://api.intercom.io/content/search?query=billing&page=2
26585+
prev:
26586+
type: string
26587+
format: uri
26588+
description: A link to the previous page of results, or null when
26589+
on the first page.
26590+
nullable: true
26591+
example:
26592+
data:
26593+
type: array
26594+
description: The list of matched content items. Each item's `type`
26595+
field determines its shape.
26596+
items:
26597+
"$ref": "#/components/schemas/content_search_result"
26598+
content_search_result:
26599+
title: Content Search Result
26600+
description: A single search result. The `type` field discriminates between
26601+
the flat shape used for snippets, external pages, files, and internal
26602+
articles, and the nested shape used for help center articles.
26603+
oneOf:
26604+
- "$ref": "#/components/schemas/content_search_default_item"
26605+
- "$ref": "#/components/schemas/content_search_article_item"
26606+
discriminator:
26607+
propertyName: type
26608+
mapping:
26609+
content_snippet: "#/components/schemas/content_search_default_item"
26610+
external_content: "#/components/schemas/content_search_default_item"
26611+
file_source_content: "#/components/schemas/content_search_default_item"
26612+
internal_article: "#/components/schemas/content_search_default_item"
26613+
article: "#/components/schemas/content_search_article_item"
2637126614
content_snippet:
2637226615
title: Content Snippet
2637326616
type: object
@@ -36069,6 +36312,9 @@ tags:
3606936312
description: Everything about your Companies
3607036313
- name: Contacts
3607136314
description: Everything about your contacts
36315+
- name: Content
36316+
description: Search and operations over Knowledge Hub content (Preview) — articles,
36317+
snippets, external pages, uploaded files, and internal articles.
3607236318
- name: Content Snippets
3607336319
description: Everything about your Content Snippets
3607436320
- name: Conversations

0 commit comments

Comments
 (0)