> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usertour.io/llms.txt
> Use this file to discover all available pages before exploring further.

# The attribute definition object

Attribute definitions are metadata objects that describe the structure and purpose of attributes in your application. They are automatically created when you send new attributes through the Usertour API or SDK.

These definitions serve as a schema registry for your attributes, ensuring consistency in attribute usage across your application. While you can't directly manage attribute definitions through the API, they are automatically maintained as you use attributes.

<ResponseField name="id" type="string">
  A unique identifier for the attribute definition.
</ResponseField>

<ResponseField name="object" type="string">
  The object type identifier. Always set to "attributeDefinition" to distinguish it from other API objects.
</ResponseField>

<ResponseField name="createdAt" type="string">
  The timestamp when the attribute definition was first created, in ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ).
</ResponseField>

<ResponseField name="dataType" type="string">
  The data type of the attribute value. For custom attributes, see [Attribute data types](/api-reference/attributes) for supported values.
</ResponseField>

<ResponseField name="description" type="string">
  A technical description of the attribute's purpose and context. This field is editable in the Usertour Dashboard and helps maintain documentation of your attribute implementation.
</ResponseField>

<ResponseField name="displayName" type="string">
  The human-readable identifier for the attribute, used in the Usertour Dashboard and analytics interfaces. This can be modified to better reflect your attribute naming conventions.
</ResponseField>

<ResponseField name="codeName" type="string">
  The immutable identifier used in your code when setting attribute values. This value is used in the attributes object when creating or updating users, and cannot be changed after creation to maintain data consistency.
</ResponseField>

<ResponseField name="scope" type="string">
  Defines which objects this attribute can be associated with. Supported values:

  * eventDefinition
  * company
  * companyMembership
  * user
</ResponseField>

<ResponseExample>
  ```json Example attribute definition object theme={null}
  {
    "id": "cm9e922or000mmjaopovxm7kv",
    "object": "attributeDefinition",
    "createdAt": "2025-04-12T13:26:30.939Z",
    "dataType": "string",
    "description": "Describes why a flow started",
    "displayName": "Flow Start Reason",
    "codeName": "flow_start_reason",
    "scope": "eventDefinition"
  }
  ```
</ResponseExample>
