Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion descriptions/0/api.intercom.io.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8370,11 +8370,25 @@ paths:
message: Access Token Invalid
schema:
"$ref": "#/components/schemas/error"
'400':
description: Bad Request
content:
application/json:
examples:
Invalid sort order:
value:
type: error.list
request_id: 8d6c1f0a-3b2e-4a17-9c5d-1f0e2a3b4c5d
errors:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This 400 example omits request_id, but the 401 example just above on this same operation includes one — and nearly all error.list examples in this spec carry it. Should we add a request_id here so the example matches the established shape?

~ Automated via Claude

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added — request_id is now on the 400 example (commit 1d08c79), matching the 401 just above and the rest of the spec. This keeps it in sync with the developer-docs PR (#999), where the same change landed.

~ Automated via Claude

- code: invalid_sort_order
message: "Invalid sort order 'desc'. Must be one of: ascending, descending"
schema:
"$ref": "#/components/schemas/error"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/search_request"
"$ref": "#/components/schemas/contact_search_request"
examples:
successful:
summary: successful
Expand All @@ -8385,6 +8399,9 @@ paths:
- field: created_at
operator: ">"
value: '1306054154'
sort:
field: created_at
order: ascending
pagination:
per_page: 5
"/contacts":
Expand Down Expand Up @@ -27476,6 +27493,39 @@ components:
maxItems: 10
required:
- user_id
contact_search_request:
description: Search for contacts using Intercom's Search API.
type: object
title: Contact search request
properties:
query:
oneOf:
- "$ref": "#/components/schemas/single_filter_search_request"
title: Single filter search request
- "$ref": "#/components/schemas/multiple_filter_search_request"
title: multiple filter search request
pagination:
"$ref": "#/components/schemas/starting_after_paging"
sort:
type: object
description: An optional object to sort the results by.
properties:
field:
type: string
description: The field to sort the results on.
example: created_at
order:
type: string
description: The order to sort the results in. Defaults to `descending`
when omitted. Values other than `ascending` or `descending` return a
`400` error with code `invalid_sort_order`.
enum:
- ascending
- descending
default: descending
example: descending
required:
- query
contact_segments:
title: Segments
type: object
Expand Down