Skip to content

Commit 31df6b7

Browse files
markdennis22claude
andcommitted
fix: Use allOf to require conversation_id only on createConversation
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>
1 parent 8273057 commit 31df6b7

File tree

9 files changed

+36
-18
lines changed

9 files changed

+36
-18
lines changed

descriptions/0/api.intercom.io.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6707,7 +6707,10 @@ paths:
67076707
message_type: inapp
67086708
conversation_id: '499'
67096709
schema:
6710-
"$ref": "#/components/schemas/message"
6710+
allOf:
6711+
- "$ref": "#/components/schemas/message"
6712+
required:
6713+
- conversation_id
67116714
'404':
67126715
description: Contact Not Found
67136716
content:
@@ -24664,7 +24667,6 @@ components:
2466424667
- created_at
2466524668
- body
2466624669
- message_type
24667-
- conversation_id
2466824670
whatsapp_message_status_list:
2466924671
type: object
2467024672
required:

descriptions/2.10/api.intercom.io.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4373,7 +4373,10 @@ paths:
43734373
message_type: inapp
43744374
conversation_id: '483'
43754375
schema:
4376-
"$ref": "#/components/schemas/message"
4376+
allOf:
4377+
- "$ref": "#/components/schemas/message"
4378+
required:
4379+
- conversation_id
43774380
'404':
43784381
description: Contact Not Found
43794382
content:
@@ -15190,7 +15193,6 @@ components:
1519015193
- created_at
1519115194
- body
1519215195
- message_type
15193-
- conversation_id
1519415196
multiple_or_single_filter_search_request:
1519515197
title: Multiple or Single Filter Search Request
1519615198
oneOf:

descriptions/2.12/api.intercom.io.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4989,7 +4989,10 @@ paths:
49894989
message_type: inapp
49904990
conversation_id: '33'
49914991
schema:
4992-
"$ref": "#/components/schemas/message"
4992+
allOf:
4993+
- "$ref": "#/components/schemas/message"
4994+
required:
4995+
- conversation_id
49934996
'404':
49944997
description: Contact Not Found
49954998
content:
@@ -16487,7 +16490,6 @@ components:
1648716490
- created_at
1648816491
- body
1648916492
- message_type
16490-
- conversation_id
1649116493
multiple_or_single_filter_search_request:
1649216494
title: Multiple or Single Filter Search Request
1649316495
oneOf:

descriptions/2.13/api.intercom.io.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5660,7 +5660,10 @@ paths:
56605660
message_type: inapp
56615661
conversation_id: '33'
56625662
schema:
5663-
"$ref": "#/components/schemas/message"
5663+
allOf:
5664+
- "$ref": "#/components/schemas/message"
5665+
required:
5666+
- conversation_id
56645667
'404':
56655668
description: Contact Not Found
56665669
content:
@@ -18190,7 +18193,6 @@ components:
1819018193
- created_at
1819118194
- body
1819218195
- message_type
18193-
- conversation_id
1819418196
multiple_filter_search_request:
1819518197
title: Multiple Filter Search Request
1819618198
description: Search using Intercoms Search APIs with more than one filter.

descriptions/2.14/api.intercom.io.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6120,7 +6120,10 @@ paths:
61206120
message_type: inapp
61216121
conversation_id: '499'
61226122
schema:
6123-
"$ref": "#/components/schemas/message"
6123+
allOf:
6124+
- "$ref": "#/components/schemas/message"
6125+
required:
6126+
- conversation_id
61246127
'404':
61256128
description: Contact Not Found
61266129
content:
@@ -20019,7 +20022,6 @@ components:
2001920022
- created_at
2002020023
- body
2002120024
- message_type
20022-
- conversation_id
2002320025
whatsapp_message_status_list:
2002420026
type: object
2002520027
required:

descriptions/2.15/api.intercom.io.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6191,7 +6191,10 @@ paths:
61916191
message_type: inapp
61926192
conversation_id: '499'
61936193
schema:
6194-
"$ref": "#/components/schemas/message"
6194+
allOf:
6195+
- "$ref": "#/components/schemas/message"
6196+
required:
6197+
- conversation_id
61956198
'404':
61966199
description: Contact Not Found
61976200
content:
@@ -20847,7 +20850,6 @@ components:
2084720850
- created_at
2084820851
- body
2084920852
- message_type
20850-
- conversation_id
2085120853
whatsapp_message_status_list:
2085220854
type: object
2085320855
required:

descriptions/2.7/api.intercom.io.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4582,7 +4582,10 @@ paths:
45824582
message_type: inapp
45834583
conversation_id: '33'
45844584
schema:
4585-
"$ref": "#/components/schemas/message"
4585+
allOf:
4586+
- "$ref": "#/components/schemas/message"
4587+
required:
4588+
- conversation_id
45864589
'404':
45874590
description: Contact Not Found
45884591
content:
@@ -13106,7 +13109,6 @@ components:
1310613109
- created_at
1310713110
- body
1310813111
- message_type
13109-
- conversation_id
1311013112
multiple_or_single_filter_search_request:
1311113113
title: Multiple or Single Filter Search Request
1311213114
oneOf:

descriptions/2.8/api.intercom.io.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4582,7 +4582,10 @@ paths:
45824582
message_type: inapp
45834583
conversation_id: '181'
45844584
schema:
4585-
"$ref": "#/components/schemas/message"
4585+
allOf:
4586+
- "$ref": "#/components/schemas/message"
4587+
required:
4588+
- conversation_id
45864589
'404':
45874590
description: Contact Not Found
45884591
content:
@@ -13131,7 +13134,6 @@ components:
1313113134
- created_at
1313213135
- body
1313313136
- message_type
13134-
- conversation_id
1313513137
multiple_or_single_filter_search_request:
1313613138
title: Multiple or Single Filter Search Request
1313713139
oneOf:

descriptions/2.9/api.intercom.io.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4583,7 +4583,10 @@ paths:
45834583
message_type: inapp
45844584
conversation_id: '329'
45854585
schema:
4586-
"$ref": "#/components/schemas/message"
4586+
allOf:
4587+
- "$ref": "#/components/schemas/message"
4588+
required:
4589+
- conversation_id
45874590
'404':
45884591
description: Contact Not Found
45894592
content:
@@ -14483,7 +14486,6 @@ components:
1448314486
- created_at
1448414487
- body
1448514488
- message_type
14486-
- conversation_id
1448714489
multiple_or_single_filter_search_request:
1448814490
title: Multiple or Single Filter Search Request
1448914491
oneOf:

0 commit comments

Comments
 (0)