curl --request PATCH \
--url https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"title": "Your Attribute",
"description": "Lorem ipsum",
"api_slug": "my-attribute",
"is_required": true,
"is_unique": true,
"default_value": {
"type": "static",
"template": [
{
"value": 5
}
]
},
"config": {
"currency": {
"default_currency_code": "USD",
"display_type": "symbol"
},
"record_reference": {
"allowed_objects": [
"people"
]
}
},
"is_archived": false
}
}
'{
"data": {
"id": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
"attribute_id": "41252299-f8c7-4b5e-99c9-4ff8321d2f96"
},
"title": "Company",
"description": "A company attribute",
"api_slug": "company",
"type": "record-reference",
"is_system_attribute": false,
"is_writable": true,
"is_required": false,
"is_unique": false,
"is_multiselect": false,
"is_default_value_enabled": false,
"is_archived": false,
"default_value": null,
"relationship": {
"id": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
"attribute_id": "41252299-f8c7-4b5e-99c9-4ff8321d2f96"
},
"object_slug": "companies",
"title": "Team members",
"api_slug": "team_members",
"is_multiselect": true
},
"created_at": "2021-11-21T13:22:49.061Z",
"config": {
"currency": {
"default_currency_code": null,
"display_type": null
},
"record_reference": {
"allowed_object_ids": [
"companies"
]
}
}
}
}Updates a single attribute on a given object or list.
Required scopes: object_configuration:read-write.
curl --request PATCH \
--url https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"title": "Your Attribute",
"description": "Lorem ipsum",
"api_slug": "my-attribute",
"is_required": true,
"is_unique": true,
"default_value": {
"type": "static",
"template": [
{
"value": 5
}
]
},
"config": {
"currency": {
"default_currency_code": "USD",
"display_type": "symbol"
},
"record_reference": {
"allowed_objects": [
"people"
]
}
},
"is_archived": false
}
}
'{
"data": {
"id": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
"attribute_id": "41252299-f8c7-4b5e-99c9-4ff8321d2f96"
},
"title": "Company",
"description": "A company attribute",
"api_slug": "company",
"type": "record-reference",
"is_system_attribute": false,
"is_writable": true,
"is_required": false,
"is_unique": false,
"is_multiselect": false,
"is_default_value_enabled": false,
"is_archived": false,
"default_value": null,
"relationship": {
"id": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
"attribute_id": "41252299-f8c7-4b5e-99c9-4ff8321d2f96"
},
"object_slug": "companies",
"title": "Team members",
"api_slug": "team_members",
"is_multiselect": true
},
"created_at": "2021-11-21T13:22:49.061Z",
"config": {
"currency": {
"default_currency_code": null,
"display_type": null
},
"record_reference": {
"allowed_object_ids": [
"companies"
]
}
}
}
}This API uses OAuth 2.0 with the authorization code grant flow.
Whether the attribute is on an object or a list.
objects, lists "lists"
A UUID or slug to identify the object or list the attribute belongs to.
"33ebdbe9-e529-47c9-b894-0ba25e9c15c0"
A UUID or slug to identify the attribute.
"41252299-f8c7-4b5e-99c9-4ff8321d2f96"
Show child attributes
The name of the attribute. The title will be visible across Attio's UI.
"Your Attribute"
A text description for the attribute.
"Lorem ipsum"
A unique, human-readable slug to access the attribute through URLs and API calls. Formatted in snake case.
"my-attribute"
When is_required is true, new records/entries must have a value for this attribute. If false, values may be null. This value does not affect existing data and you do not need to backfill null values if changing is_required from false to true.
true
Whether or not new values for this attribute must be unique. Uniqueness restrictions are only applied to new data and do not apply retroactively to previously created data.
true
The default value for this attribute. Static values are used to directly populate values using their contents. Dynamic values are used to lookup data at the point of creation. For example, you could use a dynamic value to insert a value for the currently logged in user. Which default values are available is dependent on the type of the attribute. Default values are not currently supported on people or company objects.
Show child attributes
dynamic "dynamic"
For actor reference attributes, you may pass a dynamic value of "current-user". When creating new records or entries, this will cause the actor reference value to be populated with either the workspace member or API token that created the record/entry.
current-user "current-user"
{
"type": "static",
"template": [{ "value": 5 }]
}Additional, type-dependent configuration for the attribute.
Show child attributes
Configuration available for attributes of type "currency".
Show child attributes
The ISO4217 code representing the currency that values for this attribute should be stored in.
ARS, AUD, BRL, BGN, CAD, CLP, CNY, COP, CZK, DKK, EUR, HKD, ISK, INR, ILS, JPY, KRW, MYR, MXN, NTD, NZD, NGN, NOK, XPF, PEN, PHP, PLN, GBP, RWF, SAR, SGD, ZAR, SEK, CHF, THB, AED, UYU, USD "USD"
How the currency should be displayed across the app. "code" will display the ISO currency code e.g. "USD", "name" will display the localized currency name e.g. "British pound", "narrowSymbol" will display "$1" instead of "US$1" and "symbol" will display a localized currency symbol such as "$".
code, name, narrowSymbol, symbol "symbol"
Configuration available for attributes of type "record-reference".
Show child attributes
A list of slugs or UUIDs to indicate which objects records are allowed to belong to. If relationship is also provided, this must contain only the relationship object.
1Whether the attribute has been archived or not. See our archiving guide for more information on archiving.
false
Success
Success
Show child attributes
Show child attributes
A UUID representing the workspace this attribute belongs to.
"14beef7a-99f7-4534-a87e-70b564330a4c"
A UUID to identify the object or list that this attribute belongs to
"97052eb9-e65e-443f-a297-f2d9a4a7f795"
A UUID to identify this attribute.
"41252299-f8c7-4b5e-99c9-4ff8321d2f96"
A title for the attribute, to be displayed across the app.
"Company"
A text description of the attribute.
"A company attribute"
A unique slug for the attribute for use in API responses and URLs. Formatted in snake case.
"company"
The type of the attribute.
text, number, checkbox, currency, date, timestamp, rating, status, select, record-reference, actor-reference, location, domain, email-address, phone-number, interaction, personal-name "text"
true if this is an Attio system-defined attribute, false if defined by a user or non-Attio system.
true
Whether or not this attribute can be written to. Can only be false when is_system_attribute is true (user-defined attributes are always writeable). If false, this usually means the attribute is enriched by Attio.
true
When is_required is true, new records/entries must have a value for this attribute. If false, values may be null. This value does not affect existing data and you do not need to backfill null values if changing is_required from false to true.
true
Whether or not new values for this attribute must be unique. Uniqueness restrictions are only applied to new data and do not apply retroactively to previously created data.
true
Whether or not this attribute can have multiple values. Multiselect is only available on some value types.
true
Whether this attribute has a default value enabled. Must be true when is_required is true.
true
Whether this attribute has been archived. Archived attributes are hidden from most UI, but can be restored either over the API or in workspace settings. See the guide on archiving and deletingfor more information.
false
The default value for this attribute. Static values are used to directly populate values using their contents. Dynamic values are used to lookup data at the point of creation. For example, you could use a dynamic value to insert a value for the currently logged in user. Which default values are available is dependent on the type of the attribute.
Show child attributes
dynamic "dynamic"
For actor reference attributes, you may pass a dynamic value of "current-user". When creating new records or entries, this will cause the actor reference value to be populated with either the workspace member or API token that created the record/entry.
current-user "current-user"
If this attribute is related to another attribute, this is an object that includes an id property that identifies the other attribute. null means no relationship exists. See the help center for more details about relationship attributes.
Show child attributes
Show child attributes
A UUID representing the workspace this attribute belongs to.
"14beef7a-99f7-4534-a87e-70b564330a4c"
A UUID to identify the object or list that this attribute belongs to
"97052eb9-e65e-443f-a297-f2d9a4a7f795"
A UUID to identify this attribute.
"41252299-f8c7-4b5e-99c9-4ff8321d2f96"
The slug of the object that the related attribute belongs to.
"companies"
The title of the related attribute.
"Team members"
The API slug identifying the related attribute.
"team_members"
Whether the related attribute supports selecting multiple values. Combined with the parent attribute's is_multiselect, this determines the relationship type: both false = one-to-one, parent true + related false = many-to-one, parent false + related true = one-to-many, both true = many-to-many.
true
When this attribute was created.
"2022-11-21T13:22:49.061281000Z"
Additional, type-dependent configuration for the attribute.
Show child attributes
Configuration available for attributes of type "currency".
Show child attributes
The ISO4217 code representing the currency that values for this attribute should be stored in.
ARS, AUD, BRL, BGN, CAD, CLP, CNY, COP, CZK, DKK, EUR, HKD, ISK, INR, ILS, JPY, KRW, MYR, MXN, NTD, NZD, NGN, NOK, XPF, PEN, PHP, PLN, GBP, RWF, SAR, SGD, ZAR, SEK, CHF, THB, AED, UYU, USD "USD"
How the currency should be displayed across the app. "code" will display the ISO currency code e.g. "USD", "name" will display the localized currency name e.g. "British pound", "narrowSymbol" will display "$1" instead of "US$1" and "symbol" will display a localized currency symbol such as "$".
code, name, narrowSymbol, symbol "code"
Configuration available for attributes of type "record-reference".
Show child attributes
A list of UUIDs to indicate which objects records are allowed to belong to. Leave empty to to allow records from all object types.
{
"id": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
"attribute_id": "41252299-f8c7-4b5e-99c9-4ff8321d2f96"
},
"title": "Company",
"description": "A company attribute",
"api_slug": "company",
"type": "record-reference",
"is_system_attribute": false,
"is_writable": true,
"is_required": false,
"is_unique": false,
"is_multiselect": false,
"is_default_value_enabled": false,
"is_archived": false,
"default_value": null,
"relationship": {
"id": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
"attribute_id": "41252299-f8c7-4b5e-99c9-4ff8321d2f96"
},
"object_slug": "companies",
"title": "Team members",
"api_slug": "team_members",
"is_multiselect": true
},
"created_at": "2021-11-21T13:22:49.061Z",
"config": {
"currency": {
"default_currency_code": null,
"display_type": null
},
"record_reference": { "allowed_object_ids": ["companies"] }
}
}Was this page helpful?