Skip to content

Preview: conversation part type filtering parameters - #653

Open
robertlangner-fin wants to merge 6 commits into
mainfrom
robertlangner/conversation-part-type-filtering
Open

Preview: conversation part type filtering parameters#653
robertlangner-fin wants to merge 6 commits into
mainfrom
robertlangner/conversation-part-type-filtering

Conversation

@robertlangner-fin

@robertlangner-fin robertlangner-fin commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Why?

Conversation part events (assignments, snoozes, workflow steps, etc.) get mixed in with the real messages on a conversation, and the parts limit means those events can crowd out the messages a caller actually wants. There was previously no way to ask for just the part types you care about.

How?

Adds two optional, mutually exclusive query parameters to the Preview spec for retrieving a single conversation: one to keep only the part types you name, the other to drop them. Both accept up to 50 comma-separated values and are applied before the parts limit, so you get the newest matching parts.

Available on Preview only; any other version returns a 422.

Generated with Claude Code

robertlangner-fin and others added 5 commits September 2, 2026 11:13
Adds include_part_types and exclude_part_types query parameters to
GET /conversations/{id} in the Preview spec, mirroring
intercom/intercom#568321.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The filter is gated on a Preview-only version change, not the 2.6 part
type change, so it is not available on released versions.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Matches the comma-separated query params on /content/search, so generated
clients get a list rather than one opaque string. maxItems encodes the
50-value cap the endpoint already enforces.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The parameters accepted any string with no indication of what the 115 valid
names are, and a wrong value is a hard 422. State the rule instead of an enum:
the values are the names this version returns in part_type, which stays true as
part types are added, since name_to_type_ids derives them from subclass_types
rather than a maintained list.

Call out the two names that surprise callers. "comment" is the fallback the
read path uses for any id it does not recognise, so filtering on it matches a
broader set than its name suggests. Type 13 serializes as note_and_unsnooze
here but note_and_reopen below 2.6, so a pinned integration moving to Preview
hits a 422 on the name it has been receiving.

Also point conversation_part.part_type at the filters, since that field is
where a caller discovers the vocabulary.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The parameter descriptions said an invalid filter returns a 422, but the
operation only declared 200, 404, 401 and 403, so the generated contract had
no shape for the error a caller is most likely to hit.

Adds a 422 with the four messages part_type_filter actually raises, all
carrying the parameter_invalid code that raise_invalid_param emits, and the
shared error schema.

Also carries over the conversation parts limit note that only landed in
developer-docs, so the source of truth is not missing a sentence its
downstream copy has.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@anubhav-intercom

Copy link
Copy Markdown
Contributor

Drop the version number from both parameter descriptions — say Preview-only instead.

AddConversationPartTypeFiltering lands with define_is_ready_for_release false, so the 2.17 cut won't pick it up and "until the 2.17 release" goes stale the day it ships. Suggest: "Available on the Preview version; a 422 is returned on any other version." A version can be named later, once the change is actually marked ready for release.

~ Automated via Claude

AddConversationPartTypeFiltering ships with define_is_ready_for_release
false, so the 2.17 cut will not pick it up and naming that version would
go stale on release day. A version can be named once the change is
marked ready.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants