> ## Documentation Index
> Fetch the complete documentation index at: https://unify-19-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create attribute

> Add an attribute to an object.



## OpenAPI

````yaml POST /data/v1/objects/{object_name}/attributes
openapi: 3.1.0
info:
  title: Unify Data API
  summary: Interact with objects, attributes, and records within the Unify platform.
  version: '1'
  termsOfService: https://www.unifygtm.com/legal/terms-and-conditions
  contact:
    name: Unify Support
    url: https://www.unifygtm.com/support
    email: support@unifygtm.com
servers:
  - url: https://api.unifygtm.com
    variables: {}
security:
  - ApiKeyAuth: []
tags:
  - name: Data
  - name: Object Record Query Jobs
  - name: Event Query Jobs
  - name: Lists
  - name: List Entries
  - name: Objects
  - name: Object Attributes
  - name: Object Attribute Options
  - name: Object Records
paths:
  /data/v1/objects/{object_name}/attributes:
    post:
      tags:
        - Data
        - Object Attributes
      description: Add an attribute to an object.
      operationId: create_object_attribute
      parameters:
        - name: object_name
          in: path
          required: true
          description: API name of the object.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UObjects.UAttribute'
      responses:
        '201':
          description: Response for a successful create operation.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - data
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    $ref: '#/components/schemas/UObjects.UAttribute'
                description: Response for a successful create operation.
        '400':
          description: Response for any operation that results in a bad request error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                properties:
                  status:
                    type: string
                    enum:
                      - bad_request
                      - attribute_reference_object_not_found
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/UResponses.BadRequestError'
                  message:
                    type: string
                description: >-
                  Response for any operation that results in a bad request
                  error.
        '401':
          description: Response for any operation that results in an unauthorized error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - unauthorized
                  message:
                    type: string
                description: >-
                  Response for any operation that results in an unauthorized
                  error.
        '403':
          description: Response for any operation that results in a forbidden error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - forbidden
                  message:
                    type: string
                description: Response for any operation that results in a forbidden error.
        '404':
          description: Response for any operation that results in a not found error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - object_not_found
                  message:
                    type: string
                description: Response for any operation that results in a not found error.
        '409':
          description: Response for any operation that results in a conflict error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - attribute_conflict
                  message:
                    type: string
                description: Response for any operation that results in a conflict error.
        '500':
          description: Response for any operation that results in an internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                description: >-
                  Response for any operation that results in an internal server
                  error.
components:
  schemas:
    UObjects.UAttribute:
      anyOf:
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - ADDRESS
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - BOOLEAN
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - COUNTRY
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - CURRENCY
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - DATE
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - DATETIME
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - DECIMAL
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - EMAIL_ADDRESS
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - INTEGER
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
        - $ref: '#/components/schemas/UObjects.UMultiSelectAttribute'
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - PHONE_NUMBER
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
        - $ref: '#/components/schemas/UObjects.UReferenceAttribute'
        - $ref: '#/components/schemas/UObjects.USelectAttribute'
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - TEXT
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - URL
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - UUID
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
      description: Definition of an attribute on a Unify object.
    UResponses.BadRequestError:
      type: object
      required:
        - code
      properties:
        code:
          type: string
        path:
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        object_api_name:
          type: string
        attribute_api_name:
          type: string
      allOf:
        - type: object
          unevaluatedProperties: {}
      description: Validation error detail returned for bad request responses.
    UObjects.UMultiSelectAttribute:
      type: object
      required:
        - options
      properties:
        options:
          type: array
          items:
            $ref: '#/components/schemas/UObjects.UAttributeOption'
          description: The list of options for the attribute.
      allOf:
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - MULTI_SELECT
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
      description: Definition of a "multi-select" attribute on a Unify object.
    UObjects.UReferenceAttribute:
      type: object
      required:
        - cardinality
        - related_object
        - related_attribute
      properties:
        cardinality:
          $ref: '#/components/schemas/UObjects.UReferenceCardinality'
          description: >-
            Number of records the attribute can reference. Cannot be changed
            from

            `MANY` to `ONE`.
        related_object:
          type: string
          description: The API name of the object that this attribute references.
        related_attribute:
          anyOf:
            - $ref: '#/components/schemas/UObjects.URelatedReferenceAttribute'
            - type: 'null'
          description: >-
            The optional related attribute on the referenced object. When this
            exists,

            the relationship between the two objects is bidirectional.
      allOf:
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - REFERENCE
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
      description: Definition of a "reference" attribute on a Unify object.
    UObjects.USelectAttribute:
      type: object
      required:
        - options
      properties:
        options:
          type: array
          items:
            $ref: '#/components/schemas/UObjects.UAttributeOption'
          description: The list of options for the attribute.
      allOf:
        - type: object
          required:
            - type
            - api_name
            - display_name
            - description
            - is_required
            - is_unique
          properties:
            type:
              type: string
              enum:
                - SELECT
              description: >-
                Type of value the attribute can hold. Cannot be changed after
                creation.
            api_name:
              type: string
              description: >-
                API name of the attribute. Unique within the object and cannot
                be

                changed.
            display_name:
              type: string
              description: >-
                Display name shown in Unify. Unique within the object and can be
                changed.
            description:
              anyOf:
                - type: string
                - type: 'null'
              description: Description of the attribute shown in Unify.
            is_required:
              type: boolean
              description: Whether the attribute is required.
            is_unique:
              type: boolean
              description: >-
                Whether the attribute value must be unique across records.
                Unique

                attributes can be used to match records in find-unique and
                upsert

                requests.
          description: Base properties that define an attribute on a Unify object.
      description: Definition of a "select" attribute on a Unify object.
    UObjects.UAttributeOption:
      type: object
      required:
        - api_name
        - display_name
      properties:
        api_name:
          type: string
          description: |-
            API name of the option. Unique within the attribute and cannot be
            changed.
        display_name:
          type: string
          description: >-
            Display name shown in Unify. Unique within the object and can be
            changed.
      description: Definition of an option for a `SELECT` or `MULTI_SELECT` attribute.
    UObjects.UReferenceCardinality:
      type: string
      enum:
        - ONE
        - MANY
    UObjects.URelatedReferenceAttribute:
      type: object
      required:
        - api_name
        - display_name
        - cardinality
      properties:
        api_name:
          type: string
        display_name:
          type: string
        cardinality:
          $ref: '#/components/schemas/UObjects.UReferenceCardinality'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.