You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add POST /companies/search (Preview) to OpenAPI spec
Generated via the generate-openapi-from-pr workflow from intercom/intercom
PR #543548. Documents the Preview /companies/search operation, reusing the
shared search_request and company_list schemas.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wgii8RHNriTrY4QtaJ4UDk
* Sync companies/search 200 example per_page with request example
The request example sets pagination.per_page: 5, but the paired 200
response example showed per_page: 15. Match them (5) so request/response
example pairs agree, consistent with /contacts/search.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ATc7UmfbqPvfcrHccXaMPA
* Document sort, plan.* rejection for POST /companies/search
Companies search accepts a sort object (validated server-side in
intercom/intercom#543548) but referenced the shared search_request
schema, which has no sort property. Add a company_search_request
schema mirroring contact_search_request, point the operation at it,
and document the sort object plus the tag_id filter-only-for-sort
caveat. Also call out that plan.id/plan.name are not searchable and
return 400 invalid_field.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ATc7UmfbqPvfcrHccXaMPA
* Correct IN/NIN operator validity in company search docs
IN and NIN are rejected for Date fields and for tag_id (tags allow only = and
!=), so the operator table's "All" was inaccurate.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiCwqb5R7YmYCQvXVybHG4
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Search queries can be complex, so optimizing them can help the performance of your search.
6275
+
Use the `AND` and `OR` operators to combine multiple filters to get the exact results you need and utilize
6276
+
pagination to limit the number of results returned. The default is `15` results per page.
6277
+
See the [pagination section](https://developers.intercom.com/docs/build-an-integration/learn-more/rest-apis/pagination/#example-search-conversations-request) for more details on how to use the `starting_after` param.
6278
+
{% /admonition %}
6279
+
6280
+
### Nesting & Limitations
6281
+
6282
+
You can nest these filters in order to get even more granular insights that pinpoint exactly what you need. Example: (1 OR 2) AND (3 OR 4).
6283
+
There are some limitations to the amount of multiple's there can be:
6284
+
* There's a limit of max 2 nested filters
6285
+
* There's a limit of max 15 filters for each AND or OR group
6286
+
6287
+
### Accepted Fields
6288
+
6289
+
Most keys listed as part of the Companies Model are searchable. The value you search for has to match the accepted type, otherwise the query will fail (ie. as `created_at` accepts a date, the `value` cannot be a string such as `"foobar"`).
The `plan.id` and `plan.name` fields are not searchable and return a `400` error with code `invalid_field`.
6306
+
6307
+
### Accepted Operators
6308
+
6309
+
The table below shows the operators you can use to define how you want to search for the value. The operator should be put in as a string (`"="`). The operator has to be compatible with the field's type (eg. you cannot search with `>` for a given string value as it's only compatible for integer's and dates). Searching by `tag_id` supports only the `=` and `!=` operators. The `IN` and `NIN` operators are not supported for Date fields.
| IN | All except Date and tag_id | In<br>Shortcut for `OR` queries<br>Values must be in Array |
6316
+
| NIN | All except Date and tag_id | Not In<br>Shortcut for `OR !` queries<br>Values must be in Array |
6317
+
| > | Integer<br>Date (UNIX Timestamp) | Greater than |
6318
+
| < | Integer<br>Date (UNIX Timestamp) | Lower than |
6319
+
| ~ | String | Contains |
6320
+
| !~ | String | Doesn't Contain |
6321
+
| ^ | String | Starts With |
6322
+
| $ | String | Ends With |
6323
+
6324
+
### Sorting
6325
+
6326
+
Pass an optional `sort` object with a `field` and an `order` (`ascending` or `descending`; defaults to `descending`) to order the results. An invalid `order` returns a `400` error with code `invalid_sort_order`. `tag_id` can be used as a filter but not as a sort field.
0 commit comments