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

# Create customer property definition

> Creates a new customer property schema entry for the organization. The property `id` is a UUID generated by the store. An organization can have at most 30 customer properties. Required scope: `customers:rw`.



## OpenAPI

````yaml /api/customer-data-platform/openapi.json post /v1/create_customer_property_definition
openapi: 3.0.0
info:
  title: Customer Data Platform API
  description: A service for collecting, storing, and managing end-user data.
  version: 0.0.1
servers:
  - url: https://api.text.com/cdp
    description: Main production server URL
security:
  - PersonalAccessToken: []
  - OAuth2BearerToken:
      - customers:ro
paths:
  /v1/create_customer_property_definition:
    post:
      tags:
        - Customer properties
      summary: Create customer property definition
      description: >-
        Creates a new customer property schema entry for the organization. The
        property `id` is a UUID generated by the store. An organization can have
        at most 30 customer properties. Required scope: `customers:rw`.
      operationId: createCustomerPropertyDefinition
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerPropertyRequest'
      responses:
        '200':
          description: The created customer property.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerProperty'
        '401':
          description: Invalid access token
        '403':
          description: Insufficient scopes
        '409':
          description: A property with the same name already exists in the organization.
        '422':
          description: >-
            Invalid request body, the organization's customer properties limit
            (30) has been reached, or the resulting schema exceeds the upstream
            size limit.
        '500':
          description: Internal error
      security:
        - PersonalAccessToken: []
        - OAuth2BearerToken:
            - customers:rw
components:
  schemas:
    CreateCustomerPropertyRequest:
      type: object
      required:
        - name
        - type
      properties:
        name:
          type: string
          maxLength: 128
          description: Property name, must be non-empty and unique within the organization.
        type:
          $ref: '#/components/schemas/CustomerPropertyType'
        type_configuration:
          $ref: '#/components/schemas/CustomerPropertyTypeConfiguration'
        description:
          type: string
          maxLength: 512
    CustomerProperty:
      type: object
      required:
        - id
        - name
        - type
        - type_configuration
      properties:
        id:
          type: string
          format: uuid
          description: UUID generated by the store.
        name:
          type: string
          maxLength: 128
          description: Human-readable property name, unique within the organization.
        type:
          $ref: '#/components/schemas/CustomerPropertyType'
        type_configuration:
          $ref: '#/components/schemas/CustomerPropertyTypeConfiguration'
        description:
          type: string
          maxLength: 512
    CustomerPropertyType:
      type: string
      enum:
        - bool
        - string
        - number
        - timestamp
        - link
      description: Type of the customer property value. Assigned at creation and immutable.
    CustomerPropertyTypeConfiguration:
      type: object
      description: >-
        Per-type configuration. The `format` field is only applicable to
        properties of type `timestamp`; it must be empty for all other types.
      properties:
        format:
          type: string
          enum:
            - date-time
            - date
            - time
          description: Optional rendering format for timestamp property values.
  securitySchemes:
    PersonalAccessToken:
      description: >-
        Use your `account ID` as the username and your personal access token
        (PAT) as the password, or pass a Base64-encoded value directly in the
        Authorization header. For more information, see the <a
        href="/authentication/personal-access-tokens">personal access tokens
        guide</a>.
      type: http
      scheme: basic
    OAuth2BearerToken:
      description: >-
        This API uses OAuth2 with the implicit grant flow. <a
        href="/authentication/oauth-authorization#implicit-grant">Learn about
        the implicit grant flow.</a>
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.livechat.com
          scopes: {}
        authorizationCode:
          authorizationUrl: https://accounts.livechat.com
          tokenUrl: https://accounts.livechat.com/token
          scopes: {}

````