PUT/data_attributes/{data_attribute_id}

Update a data attribute

Updates a data attribute's archived status, description, Messenger write access, or list options. You cannot change the attribute's data type through this API; use the UI to change it.

2 parameters · 3 body fields
data_attribute_idintegerrequired
The ID of the data attribute to update.
Intercom-Versionstringoptional
The Intercom API version to use. Defaults to 2.17 when omitted; use a supported version.
Allowed:1.01.11.21.31.42.02.12.22.32.42.52.6Default:2.17

Fields to update on the data attribute. For list attributes, provide at least two options.

archivedbooleanoptional
Whether the attribute is to be archived or not.
descriptionstringoptional
The readable description you see in the UI for the attribute.
messenger_writablebooleanoptional
Can this attribute be updated by the Messenger

5 status codes
200Returns the updated data attribute, including its identifier, model, name, data type, options, and writable and archived flags.
typestringoptional
Value is `data_attribute`.
Allowed:data_attribute
idintegeroptional
The unique identifier for the data attribute which is given by Intercom. Only available for custom attributes.
modelstringoptional
Value is `contact` for user/lead attributes and `company` for company attributes.
Allowed:contactcompany
namestringoptional
Name of the attribute.
full_namestringoptional
Full name of the attribute. Should match the name unless it's a nested attribute. We can split full_name on `.` to access nested user object values.
labelstringoptional
Readable name of the attribute (i.e. name you see in the UI)
descriptionstringoptional
Readable description of the attribute.
data_typestringoptional
The data type of the attribute.
Allowed:stringintegerfloatbooleandate
optionsarray<string>optional
List of predefined options for attribute value.
api_writablebooleanoptional
Can this attribute be updated through API
messenger_writablebooleanoptional
Can this attribute be updated by the Messenger
ui_writablebooleanoptional
Can this attribute be updated in the UI
custombooleanoptional
Set to true if this is a CDA
archivedbooleanoptional
Is this attribute archived. (Only applicable to CDAs)
created_atintegeroptional
The time the attribute was created as a UTC Unix timestamp
updated_atintegeroptional
The time the attribute was last updated as a UTC Unix timestamp
admin_idstringoptional
Teammate who created the attribute. Only applicable to CDAs
400Returned when a list attribute has fewer than two options.

One documented failure

  • parameter_invalid

    Options isn't an array

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects
401Returned when the request is unauthorized.

One documented failure

  • unauthorized

    Access Token Invalid

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects
404Returned when the data attribute is not found.

One documented failure

  • field_not_found

    We couldn't find that data attribute to update

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects
422Returned when the data attribute has a dependent object.

One documented failure

  • data_invalid

    The Data Attribute you are trying to archive has a dependant object

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects

Error handling

A 400 is returned when a list attribute has fewer than two options; a 401 is returned when the request is unauthorized; a 404 is returned when the attribute is not found; and a 422 is returned when the attribute has a dependent object. The data_attribute_id path parameter identifies the attribute to update. For a list attribute, options must contain at least two entries; change data_type through the UI, not this API.