fix: Mark conversation_id as required in message schema#423
fix: Mark conversation_id as required in message schema#423markdennis22 merged 3 commits intomainfrom
Conversation
The conversation_id field was missing from the required array in the message schema, making it appear optional in rendered API docs. This confused customers into thinking the Create Conversation endpoint might not always return a conversation ID. Added conversation_id to the required array across all versions (2.11 already had it). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
This adds
The spec itself already reflects this: the Suggested approach: use # before
schema:
"$ref": "#/components/schemas/message"
# after
schema:
allOf:
- "$ref": "#/components/schemas/message"
required:
- conversation_idLeave the shared |
The previous approach added conversation_id to the shared message schema's required array, which would incorrectly enforce it on all endpoints using that schema (including createMessage, where admin messages don't include conversation_id). Instead, use allOf at the createConversation endpoint level to extend the message schema with conversation_id as required — matching the established pattern used elsewhere in these specs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The One thing: v2.11 ( Confirmed it should have the change:
|
Missed in the initial update — v2.11 inherits AddConversationIdToUserMessageResponse from v2.2 and its example already includes conversation_id: '363'. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Why?
The
conversation_idfield in themessageresponse schema is not marked as required, making it appear optional in the rendered API docs. A customer reported this was confusing — they thought there were cases where the Create Conversation API wouldn't return a conversation ID.How?
Added
conversation_idto therequiredarray in themessageschema across all API versions (v2.7–v2.10, v2.12–v2.15, and Unstable). Version 2.11 already had it and was left unchanged.What was confusing and how this fixes it
conversation_idrendered without a "required" badge in the response docsconversation_idnow shows the red "required" badge, matchingtype,id,created_at,body, andmessage_typeconversation_idis always returnedCompanion PR in developer-docs: intercom/developer-docs#798
Generated with Claude Code