Skip to content

Add email history to conversation source (Unstable spec)#421

Merged
VarshSuresh merged 1 commit intomainfrom
VarshSuresh/add-email-history-to-conversation-source
Mar 25, 2026
Merged

Add email history to conversation source (Unstable spec)#421
VarshSuresh merged 1 commit intomainfrom
VarshSuresh/add-email-history-to-conversation-source

Conversation

@VarshSuresh
Copy link
Contributor

@VarshSuresh VarshSuresh commented Mar 25, 2026

Why?

Customers need access to quoted/forwarded email threads when retrieving conversation details. This change implements the email history feature documented in intercom/developer-docs#795 (which was mirrored from intercom/intercom#467590), adding the ability to opt-in via the include_email_history query parameter.

How?

Added four schema changes to support email history in the Unstable API spec:

  1. Query parameter: include_email_history on GET /conversations/{id} to opt-in to email history
  2. Response example: Demonstrates email conversation with populated email_message_metadata containing the history field
  3. Schema field: Added email_message_metadata reference to conversation_source schema
  4. Schema definition: New source_email_message_metadata component with message_id, subject, email_address_headers, and history fields

The schema is separate from the existing email_message_metadata (used by conversation parts) to keep email source metadata domain-specific.

Validated with fern check — 0 errors.

Swagger

image image

Generated with Claude Code

Implements four schema changes to support email history in conversation sources:
1. Add `include_email_history` query parameter to GET /conversations/{id}
2. Add response example showing email conversation with history metadata
3. Add `email_message_metadata` field to conversation_source schema
4. Add new `source_email_message_metadata` schema with history field

This enables API clients to retrieve quoted/forwarded email threads when
fetching conversation details with `?include_email_history=true`.

Aligns with intercom/developer-docs#795 and intercom/intercom#467590.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@VarshSuresh VarshSuresh requested a review from a team March 25, 2026 08:27
@VarshSuresh VarshSuresh merged commit 0bb613c into main Mar 25, 2026
3 checks passed
@VarshSuresh VarshSuresh deleted the VarshSuresh/add-email-history-to-conversation-source branch March 25, 2026 12:38
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