Skip to content

Commit b70560d

Browse files
efassorclaude
andcommitted
Add conversation attribute support to POST /data_attributes (Unstable)
Document the new model: "conversation" support in the create data attribute endpoint, including new data types (list, decimal, relationship, files), new fields (multiline, list_options, reference), and the PUT endpoint restriction for conversation attributes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d25d9e2 commit b70560d

File tree

1 file changed

+177
-5
lines changed

1 file changed

+177
-5
lines changed

descriptions/0/api.intercom.io.yaml

Lines changed: 177 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10186,7 +10186,7 @@ paths:
1018610186
tags:
1018710187
- Data Attributes
1018810188
operationId: createDataAttribute
10189-
description: You can create a data attributes for a `contact` or a `company`.
10189+
description: You can create data attributes for a `contact`, a `company`, or a `conversation`.
1019010190
responses:
1019110191
'200':
1019210192
description: Successful
@@ -10210,6 +10210,27 @@ paths:
1021010210
created_at: 1734537756
1021110211
updated_at: 1734537756
1021210212
model: company
10213+
Successful conversation attribute:
10214+
value:
10215+
id: 38
10216+
type: data_attribute
10217+
name: Priority
10218+
full_name: custom_attributes.Priority
10219+
label: Priority
10220+
data_type: list
10221+
api_writable: true
10222+
ui_writable: false
10223+
messenger_writable: false
10224+
custom: true
10225+
archived: false
10226+
admin_id: '991267786'
10227+
created_at: 1734537756
10228+
updated_at: 1734537756
10229+
model: conversation
10230+
list_options:
10231+
- label: Low
10232+
- label: Medium
10233+
- label: High
1021310234
schema:
1021410235
"$ref": "#/components/schemas/data_attribute"
1021510236
'400':
@@ -10256,6 +10277,27 @@ paths:
1025610277
- code: parameter_invalid
1025710278
message: The Data Attribute model field must be either contact
1025810279
or company
10280+
Duplicate conversation attribute:
10281+
value:
10282+
type: error.list
10283+
request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
10284+
errors:
10285+
- code: parameter_invalid
10286+
message: A conversation attribute with that name already exists
10287+
List options required:
10288+
value:
10289+
type: error.list
10290+
request_id: b2c3d4e5-f6a7-8901-bcde-f12345678901
10291+
errors:
10292+
- code: parameter_invalid
10293+
message: Data type is list but no list options were given
10294+
List options wrong type:
10295+
value:
10296+
type: error.list
10297+
request_id: c3d4e5f6-a7b8-9012-cdef-123456789012
10298+
errors:
10299+
- code: parameter_invalid
10300+
message: list_options can only be used with data_type list
1025910301
schema:
1026010302
"$ref": "#/components/schemas/error"
1026110303
'401':
@@ -10315,6 +10357,32 @@ paths:
1031510357
options:
1031610358
- value: 1-10
1031710359
archived: false
10360+
conversation_list_attribute:
10361+
summary: Conversation list attribute
10362+
value:
10363+
name: Priority
10364+
model: conversation
10365+
data_type: list
10366+
list_options:
10367+
- label: Low
10368+
- label: Medium
10369+
- label: High
10370+
conversation_relationship_attribute:
10371+
summary: Conversation relationship attribute
10372+
value:
10373+
name: Related Company
10374+
model: conversation
10375+
data_type: relationship
10376+
reference:
10377+
reference_type: references_one
10378+
referenced_object_type_identifier: company
10379+
conversation_string_attribute:
10380+
summary: Conversation string attribute
10381+
value:
10382+
name: Notes
10383+
model: conversation
10384+
data_type: string
10385+
multiline: true
1031810386
"/data_attributes/{id}":
1031910387
put:
1032010388
summary: Update a data attribute
@@ -10336,7 +10404,9 @@ paths:
1033610404
description: "\nYou can update a data attribute.\n\n> \U0001F6A7 Updating the
1033710405
data type is not possible\n>\n> It is currently a dangerous action to execute
1033810406
changing a data attribute's type via the API. You will need to update the
10339-
type via the UI instead.\n"
10407+
type via the UI instead.\n\n> \U0001F6A7 Conversation attributes cannot be
10408+
updated\n>\n> Updating conversation attributes via the API is not supported.
10409+
Attempting to update a conversation attribute will return a 400 error.\n"
1034010410
responses:
1034110411
'200':
1034210412
description: Successful
@@ -10378,6 +10448,13 @@ paths:
1037810448
errors:
1037910449
- code: parameter_invalid
1038010450
message: Options isn't an array
10451+
Conversation attribute update not supported:
10452+
value:
10453+
type: error.list
10454+
request_id: d4e5f6a7-b8c9-0123-defa-234567890123
10455+
errors:
10456+
- code: parameter_invalid
10457+
message: Updating conversation attributes is not supported
1038110458
schema:
1038210459
"$ref": "#/components/schemas/error"
1038310460
'404':
@@ -21506,10 +21583,11 @@ components:
2150621583
example: My Data Attribute
2150721584
model:
2150821585
type: string
21509-
description: The model that the data attribute belongs to.
21586+
description: The model that the data attribute belongs to. Use 'conversation' to create conversation-specific attributes.
2151021587
enum:
2151121588
- contact
2151221589
- company
21590+
- conversation
2151321591
example: contact
2151421592
description:
2151521593
type: string
@@ -21519,6 +21597,10 @@ components:
2151921597
type: boolean
2152021598
description: Can this attribute be updated by the Messenger
2152121599
example: false
21600+
multiline:
21601+
type: boolean
21602+
description: Whether a string-type conversation attribute supports multiline text. Only applicable when model is conversation and data_type is string.
21603+
example: false
2152221604
required:
2152321605
- name
2152421606
- model
@@ -21552,7 +21634,54 @@ components:
2155221634
- boolean
2155321635
- datetime
2155421636
- date
21637+
- decimal
21638+
- files
2155521639
title: 'other type'
21640+
- properties:
21641+
data_type:
21642+
enum:
21643+
- list
21644+
list_options:
21645+
type: array
21646+
description: An array of options for a list-type conversation attribute. Each option must have a label key. At least two options are required.
21647+
items:
21648+
type: object
21649+
properties:
21650+
label:
21651+
type: string
21652+
description: The display label for this list option.
21653+
example: Option A
21654+
example:
21655+
- label: Option A
21656+
- label: Option B
21657+
required:
21658+
- list_options
21659+
title: 'conversation list attribute'
21660+
- properties:
21661+
data_type:
21662+
enum:
21663+
- relationship
21664+
reference:
21665+
type: object
21666+
description: Defines the relationship configuration for a relationship-type conversation attribute.
21667+
properties:
21668+
reference_type:
21669+
type: string
21670+
description: Whether this attribute references one or many related objects.
21671+
enum:
21672+
- references_one
21673+
- references_many
21674+
example: references_one
21675+
referenced_object_type_identifier:
21676+
type: string
21677+
description: The identifier of the object type this attribute references.
21678+
example: company
21679+
required:
21680+
- reference_type
21681+
- referenced_object_type_identifier
21682+
required:
21683+
- reference
21684+
title: 'conversation relationship attribute'
2155621685
create_data_event_request:
2155721686
description: ''
2155821687
type: object
@@ -22452,11 +22581,11 @@ components:
2245222581
example: 12878
2245322582
model:
2245422583
type: string
22455-
description: Value is `contact` for user/lead attributes and `company` for
22456-
company attributes.
22584+
description: Value is `contact` for user/lead attributes, `company` for company attributes, and `conversation` for conversation attributes.
2245722585
enum:
2245822586
- contact
2245922587
- company
22588+
- conversation
2246022589
example: contact
2246122590
name:
2246222591
type: string
@@ -22485,6 +22614,11 @@ components:
2248522614
- float
2248622615
- boolean
2248722616
- date
22617+
- decimal
22618+
- datetime
22619+
- list
22620+
- relationship
22621+
- files
2248822622
example: boolean
2248922623
options:
2249022624
type: array
@@ -22494,6 +22628,44 @@ components:
2249422628
example:
2249522629
- 'true'
2249622630
- 'false'
22631+
multiline:
22632+
type: boolean
22633+
nullable: true
22634+
description: Whether this string-type conversation attribute supports multiline text. Only present for conversation attributes.
22635+
example: false
22636+
list_options:
22637+
type: array
22638+
nullable: true
22639+
description: List of options for a list-type conversation attribute. Each option has a label key. Only present for conversation attributes with data_type list.
22640+
items:
22641+
type: object
22642+
properties:
22643+
label:
22644+
type: string
22645+
description: The display label for this list option.
22646+
example: Option A
22647+
example:
22648+
- label: Option A
22649+
- label: Option B
22650+
reference:
22651+
type: object
22652+
nullable: true
22653+
description: The relationship configuration for a relationship-type conversation attribute. Only present for conversation attributes with data_type relationship.
22654+
properties:
22655+
reference_type:
22656+
type: string
22657+
description: Whether this attribute references one or many related objects.
22658+
enum:
22659+
- references_one
22660+
- references_many
22661+
example: references_one
22662+
referenced_object_type_identifier:
22663+
type: string
22664+
description: The identifier of the object type this attribute references.
22665+
example: company
22666+
example:
22667+
reference_type: references_one
22668+
referenced_object_type_identifier: company
2249722669
api_writable:
2249822670
type: boolean
2249922671
description: Can this attribute be updated through API

0 commit comments

Comments
 (0)