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

# Create property definition

> Create a new contact property definition for your organization



## OpenAPI

````yaml /openapi.json post /v1/contact-properties
openapi: 3.0.3
info:
  title: Emailr API
  version: 1.0.0
servers:
  - url: https://api.emailr.dev
    description: Production
security: []
tags:
  - name: emails
    description: Email sending and management
  - name: contacts
    description: Contact management
  - name: templates
    description: Email template management
  - name: domains
    description: Domain verification and management
  - name: webhooks
    description: Webhook configuration
  - name: broadcasts
    description: Broadcast campaign management
  - name: segments
    description: Contact segmentation
paths:
  /v1/contact-properties:
    post:
      tags:
        - contact-properties
      summary: Create property definition
      description: Create a new contact property definition for your organization
      operationId: createPropertyDefinition
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePropertyDefinitionRequest'
      responses:
        '200':
          description: Property definition created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PropertyDefinition'
        '400':
          description: Validation error or duplicate property name
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    CreatePropertyDefinitionRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
          pattern: ^[a-zA-Z0-9_]+$
          example: company
        type:
          allOf:
            - $ref: '#/components/schemas/PropertyType'
            - example: string
      required:
        - name
        - type
    PropertyDefinition:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
        organization_id:
          type: string
          format: uuid
        name:
          type: string
          example: company
        type:
          $ref: '#/components/schemas/PropertyType'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - organization_id
        - name
        - type
        - created_at
        - updated_at
    Error:
      type: object
      properties:
        error:
          type: string
          example: An error occurred
        code:
          type: string
          example: VALIDATION_ERROR
        details: {}
      required:
        - error
    PropertyType:
      type: string
      enum:
        - string
        - number
        - boolean
        - date
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API key authentication. Use your API key as the bearer token.

````