Skip to content

Commit 3d5adcb

Browse files
cox512claude
andauthored
Correct the 200 response schema for attaching and detaching a contact (#655)
* Correct the 200 response schema for attach and detach contact Both endpoints declared a 200 body of `conversation`, but each returns only the conversation's remaining contacts: an object with a `customers` array of `{ type, id }`. The inline 200 examples already showed that shape, so the examples were right and the schema was wrong. Adds a shared `conversation_customers_response` schema describing the real body and points both operations' 200 at it, across Preview and v2.7-v2.16. `type` is documented in prose rather than as an enum so a future contact role does not become a breaking SDK change. This changes the generated SDK return type for both operations from `Conversation` to `ConversationCustomersResponse`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YXXKa8L8m446cLYBiqtsWF * Address review: add customers example, drop visitor from contact roles A visitor cannot be a conversation participant -- the spec states a visitor is converted to a contact with a lead role when a conversation is created -- so documenting it here would promise clients a category these endpoints never return. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YXXKa8L8m446cLYBiqtsWF * Name the response schema after participants, not customers These operations are grouped under Conversation Participants, and participant is the term used for a conversation's contacts. The JSON field stays customers because that is what the endpoints actually send. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YXXKa8L8m446cLYBiqtsWF * Revert two unrelated contact-ID descriptions The participant rename matched as a prefix of an unrelated bulk-contact description, so those two lines now read contact again. Bulk contact operations act on any contact, not only conversation participants. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YXXKa8L8m446cLYBiqtsWF --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 32e9c49 commit 3d5adcb

11 files changed

Lines changed: 330 additions & 22 deletions

‎descriptions/0/api.intercom.io.yaml‎

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14556,7 +14556,7 @@ paths:
1455614556
- type: user
1455714557
id: 6762f19b1bb69f9f2193bbd4
1455814558
schema:
14559-
"$ref": "#/components/schemas/conversation"
14559+
"$ref": "#/components/schemas/conversation_participants_response"
1456014560
'404':
1456114561
description: Not found
1456214562
content:
@@ -14661,7 +14661,7 @@ paths:
1466114661
- type: user
1466214662
id: 6762f1b41bb69f9f2193bbe0
1466314663
schema:
14664-
"$ref": "#/components/schemas/conversation"
14664+
"$ref": "#/components/schemas/conversation_participants_response"
1466514665
'404':
1466614666
description: Contact not found
1466714667
content:
@@ -29100,6 +29100,34 @@ components:
2910029100
"$ref": "#/components/schemas/customer_request"
2910129101
required:
2910229102
- email
29103+
conversation_participants_response:
29104+
title: Conversation Participants Response
29105+
type: object
29106+
description: The participants of the conversation, returned after attaching
29107+
or detaching a contact
29108+
properties:
29109+
customers:
29110+
type: array
29111+
description: The conversation participants after the change
29112+
items:
29113+
type: object
29114+
properties:
29115+
type:
29116+
type: string
29117+
description: The role of the participant. Can be "user" or "lead"
29118+
example: 'user'
29119+
id:
29120+
type: string
29121+
description: The unique identifier for the participant
29122+
example: '6762f1a61bb69f9f2193bbd8'
29123+
required:
29124+
- type
29125+
- id
29126+
example:
29127+
- type: user
29128+
id: '6762f1a61bb69f9f2193bbd8'
29129+
required:
29130+
- customers
2910329131
team_metric:
2910429132
type: object
2910529133
description: Per-admin activity metrics within a team.

‎descriptions/2.10/api.intercom.io.yaml‎

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5971,7 +5971,7 @@ paths:
59715971
- type: user
59725972
id: 6657accd6abd0166b52ae296
59735973
schema:
5974-
"$ref": "#/components/schemas/conversation"
5974+
"$ref": "#/components/schemas/conversation_participants_response"
59755975
'404':
59765976
description: Not found
59775977
content:
@@ -6076,7 +6076,7 @@ paths:
60766076
- type: user
60776077
id: 6657acdb6abd0166b52ae2a2
60786078
schema:
6079-
"$ref": "#/components/schemas/conversation"
6079+
"$ref": "#/components/schemas/conversation_participants_response"
60806080
'404':
60816081
description: Contact not found
60826082
content:
@@ -11937,6 +11937,34 @@ components:
1193711937
"$ref": "#/components/schemas/customer_request"
1193811938
required:
1193911939
- email
11940+
conversation_participants_response:
11941+
title: Conversation Participants Response
11942+
type: object
11943+
description: The participants of the conversation, returned after attaching
11944+
or detaching a contact
11945+
properties:
11946+
customers:
11947+
type: array
11948+
description: The conversation participants after the change
11949+
items:
11950+
type: object
11951+
properties:
11952+
type:
11953+
type: string
11954+
description: The role of the participant. Can be "user" or "lead"
11955+
example: 'user'
11956+
id:
11957+
type: string
11958+
description: The unique identifier for the participant
11959+
example: '6762f1a61bb69f9f2193bbd8'
11960+
required:
11961+
- type
11962+
- id
11963+
example:
11964+
- type: user
11965+
id: '6762f1a61bb69f9f2193bbd8'
11966+
required:
11967+
- customers
1194011968
close_conversation_request:
1194111969
title: Close Conversation Request
1194211970
type: object

‎descriptions/2.11/api.intercom.io.yaml‎

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6081,7 +6081,7 @@ paths:
60816081
- type: user
60826082
id: 667d61168a68186f43bafe0d
60836083
schema:
6084-
"$ref": "#/components/schemas/conversation"
6084+
"$ref": "#/components/schemas/conversation_participants_response"
60856085
'404':
60866086
description: Not found
60876087
content:
@@ -6186,7 +6186,7 @@ paths:
61866186
- type: user
61876187
id: 667d61228a68186f43bafe19
61886188
schema:
6189-
"$ref": "#/components/schemas/conversation"
6189+
"$ref": "#/components/schemas/conversation_participants_response"
61906190
'404':
61916191
description: Contact not found
61926192
content:
@@ -12179,6 +12179,34 @@ components:
1217912179
nullable: true
1218012180
required:
1218112181
- email
12182+
conversation_participants_response:
12183+
title: Conversation Participants Response
12184+
type: object
12185+
description: The participants of the conversation, returned after attaching
12186+
or detaching a contact
12187+
properties:
12188+
customers:
12189+
type: array
12190+
description: The conversation participants after the change
12191+
items:
12192+
type: object
12193+
properties:
12194+
type:
12195+
type: string
12196+
description: The role of the participant. Can be "user" or "lead"
12197+
example: 'user'
12198+
id:
12199+
type: string
12200+
description: The unique identifier for the participant
12201+
example: '6762f1a61bb69f9f2193bbd8'
12202+
required:
12203+
- type
12204+
- id
12205+
example:
12206+
- type: user
12207+
id: '6762f1a61bb69f9f2193bbd8'
12208+
required:
12209+
- customers
1218212210
button_component:
1218312211
title: Button Component
1218412212
type: object

‎descriptions/2.12/api.intercom.io.yaml‎

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6491,7 +6491,7 @@ paths:
64916491
- type: user
64926492
id: 677c55ef6abd011ad17ff541
64936493
schema:
6494-
"$ref": "#/components/schemas/conversation"
6494+
"$ref": "#/components/schemas/conversation_participants_response"
64956495
'404':
64966496
description: Not found
64976497
content:
@@ -6596,7 +6596,7 @@ paths:
65966596
- type: user
65976597
id: 677c56016abd011ad17ff54d
65986598
schema:
6599-
"$ref": "#/components/schemas/conversation"
6599+
"$ref": "#/components/schemas/conversation_participants_response"
66006600
'404':
66016601
description: Contact not found
66026602
content:
@@ -12843,6 +12843,34 @@ components:
1284312843
"$ref": "#/components/schemas/customer_request"
1284412844
required:
1284512845
- email
12846+
conversation_participants_response:
12847+
title: Conversation Participants Response
12848+
type: object
12849+
description: The participants of the conversation, returned after attaching
12850+
or detaching a contact
12851+
properties:
12852+
customers:
12853+
type: array
12854+
description: The conversation participants after the change
12855+
items:
12856+
type: object
12857+
properties:
12858+
type:
12859+
type: string
12860+
description: The role of the participant. Can be "user" or "lead"
12861+
example: 'user'
12862+
id:
12863+
type: string
12864+
description: The unique identifier for the participant
12865+
example: '6762f1a61bb69f9f2193bbd8'
12866+
required:
12867+
- type
12868+
- id
12869+
example:
12870+
- type: user
12871+
id: '6762f1a61bb69f9f2193bbd8'
12872+
required:
12873+
- customers
1284612874
close_conversation_request:
1284712875
title: Close Conversation Request
1284812876
type: object

‎descriptions/2.13/api.intercom.io.yaml‎

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7476,7 +7476,7 @@ paths:
74767476
- type: user
74777477
id: 677c55ef6abd011ad17ff541
74787478
schema:
7479-
"$ref": "#/components/schemas/conversation"
7479+
"$ref": "#/components/schemas/conversation_participants_response"
74807480
'404':
74817481
description: Not found
74827482
content:
@@ -7581,7 +7581,7 @@ paths:
75817581
- type: user
75827582
id: 677c56016abd011ad17ff54d
75837583
schema:
7584-
"$ref": "#/components/schemas/conversation"
7584+
"$ref": "#/components/schemas/conversation_participants_response"
75857585
'404':
75867586
description: Contact not found
75877587
content:
@@ -14294,6 +14294,34 @@ components:
1429414294
"$ref": "#/components/schemas/customer_request"
1429514295
required:
1429614296
- email
14297+
conversation_participants_response:
14298+
title: Conversation Participants Response
14299+
type: object
14300+
description: The participants of the conversation, returned after attaching
14301+
or detaching a contact
14302+
properties:
14303+
customers:
14304+
type: array
14305+
description: The conversation participants after the change
14306+
items:
14307+
type: object
14308+
properties:
14309+
type:
14310+
type: string
14311+
description: The role of the participant. Can be "user" or "lead"
14312+
example: 'user'
14313+
id:
14314+
type: string
14315+
description: The unique identifier for the participant
14316+
example: '6762f1a61bb69f9f2193bbd8'
14317+
required:
14318+
- type
14319+
- id
14320+
example:
14321+
- type: user
14322+
id: '6762f1a61bb69f9f2193bbd8'
14323+
required:
14324+
- customers
1429714325
close_conversation_request:
1429814326
title: Close Conversation Request
1429914327
type: object

‎descriptions/2.14/api.intercom.io.yaml‎

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8459,7 +8459,7 @@ paths:
84598459
- type: user
84608460
id: 6762f19b1bb69f9f2193bbd4
84618461
schema:
8462-
"$ref": "#/components/schemas/conversation"
8462+
"$ref": "#/components/schemas/conversation_participants_response"
84638463
'404':
84648464
description: Not found
84658465
content:
@@ -8564,7 +8564,7 @@ paths:
85648564
- type: user
85658565
id: 6762f1b41bb69f9f2193bbe0
85668566
schema:
8567-
"$ref": "#/components/schemas/conversation"
8567+
"$ref": "#/components/schemas/conversation_participants_response"
85688568
'404':
85698569
description: Contact not found
85708570
content:
@@ -15951,6 +15951,34 @@ components:
1595115951
"$ref": "#/components/schemas/customer_request"
1595215952
required:
1595315953
- email
15954+
conversation_participants_response:
15955+
title: Conversation Participants Response
15956+
type: object
15957+
description: The participants of the conversation, returned after attaching
15958+
or detaching a contact
15959+
properties:
15960+
customers:
15961+
type: array
15962+
description: The conversation participants after the change
15963+
items:
15964+
type: object
15965+
properties:
15966+
type:
15967+
type: string
15968+
description: The role of the participant. Can be "user" or "lead"
15969+
example: 'user'
15970+
id:
15971+
type: string
15972+
description: The unique identifier for the participant
15973+
example: '6762f1a61bb69f9f2193bbd8'
15974+
required:
15975+
- type
15976+
- id
15977+
example:
15978+
- type: user
15979+
id: '6762f1a61bb69f9f2193bbd8'
15980+
required:
15981+
- customers
1595415982
away_status_reason:
1595515983
type: object
1595615984
properties:

‎descriptions/2.15/api.intercom.io.yaml‎

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8382,7 +8382,7 @@ paths:
83828382
- type: user
83838383
id: 6762f19b1bb69f9f2193bbd4
83848384
schema:
8385-
"$ref": "#/components/schemas/conversation"
8385+
"$ref": "#/components/schemas/conversation_participants_response"
83868386
'404':
83878387
description: Not found
83888388
content:
@@ -8487,7 +8487,7 @@ paths:
84878487
- type: user
84888488
id: 6762f1b41bb69f9f2193bbe0
84898489
schema:
8490-
"$ref": "#/components/schemas/conversation"
8490+
"$ref": "#/components/schemas/conversation_participants_response"
84918491
'404':
84928492
description: Contact not found
84938493
content:
@@ -16636,6 +16636,34 @@ components:
1663616636
"$ref": "#/components/schemas/customer_request"
1663716637
required:
1663816638
- email
16639+
conversation_participants_response:
16640+
title: Conversation Participants Response
16641+
type: object
16642+
description: The participants of the conversation, returned after attaching
16643+
or detaching a contact
16644+
properties:
16645+
customers:
16646+
type: array
16647+
description: The conversation participants after the change
16648+
items:
16649+
type: object
16650+
properties:
16651+
type:
16652+
type: string
16653+
description: The role of the participant. Can be "user" or "lead"
16654+
example: 'user'
16655+
id:
16656+
type: string
16657+
description: The unique identifier for the participant
16658+
example: '6762f1a61bb69f9f2193bbd8'
16659+
required:
16660+
- type
16661+
- id
16662+
example:
16663+
- type: user
16664+
id: '6762f1a61bb69f9f2193bbd8'
16665+
required:
16666+
- customers
1663916667
brand:
1664016668
type: object
1664116669
title: Brand

0 commit comments

Comments
 (0)